From f49d3c74587cf7f9d9af9258e422cfe68da82cb9 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Thu, 27 Oct 2022 17:08:58 -0400 Subject: [PATCH 01/60] Correct many file headers to show 86box --- src/codegen/codegen.h | 28 +- src/codegen/codegen_x86.c | 72 +++--- src/cpu/codegen_public.h | 24 +- src/cpu/x86_ops.h | 30 +-- src/device.c | 26 +- src/device/isamem.c | 82 +++--- src/device/isartc.c | 84 +++--- src/disk/hdc_xta.c | 138 +++++----- src/floppy/fdc_pii15xb.c | 66 ++--- src/floppy/fdd_json.c | 46 ++-- src/game/joystick_ch_flightstick_pro.c | 20 +- src/game/joystick_standard.c | 20 +- src/game/joystick_sw_pad.c | 60 ++--- src/game/joystick_tm_fcs.c | 20 +- src/include/86box/bswap.h | 68 ++--- src/include/86box/device.h | 24 +- src/include/86box/dma.h | 24 +- src/include/86box/fdd_json.h | 44 ++-- src/include/86box/isamem.h | 44 ++-- src/include/86box/isartc.h | 44 ++-- src/include/86box/joystick_standard.h | 20 +- src/include/86box/joystick_sw_pad.h | 20 +- src/include/86box/joystick_tm_fcs.h | 20 +- src/include/86box/keyboard.h | 24 +- src/include/86box/m_at_t3100e.h | 24 +- src/include/86box/m_xt_t1000.h | 24 +- src/include/86box/net_ne2000.h | 16 +- src/include/86box/network.h | 44 ++-- src/include/86box/nvr.h | 48 ++-- src/include/86box/nvr_ps2.h | 20 +- src/include/86box/png_struct.h | 44 ++-- src/include/86box/printer.h | 44 ++-- src/include/86box/video.h | 22 +- src/machine/m_at.c | 24 +- src/machine/m_at_commodore.c | 24 +- src/machine/m_at_t3100e.c | 202 +++++++-------- src/machine/m_at_t3100e_vid.c | 50 ++-- src/machine/m_ps1_hdc.c | 328 ++++++++++++------------ src/machine/m_ps2_mca.c | 24 +- src/machine/m_xt_t1000.c | 92 +++---- src/machine/m_xt_t1000_vid.c | 30 +-- src/network/net_ne2000.c | 38 +-- src/network/net_pcap.c | 44 ++-- src/network/network.c | 50 ++-- src/network/pcap_if.c | 46 ++-- src/nvr.c | 48 ++-- src/nvr_at.c | 338 ++++++++++++------------- src/nvr_ps2.c | 20 +- src/printer/png.c | 44 ++-- src/printer/prt_cpmap.c | 50 ++-- src/printer/prt_escp.c | 66 ++--- src/printer/prt_text.c | 56 ++-- 52 files changed, 1454 insertions(+), 1454 deletions(-) diff --git a/src/codegen/codegen.h b/src/codegen/codegen.h index ac85d8662..4a154be2d 100644 --- a/src/codegen/codegen.h +++ b/src/codegen/codegen.h @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the code generator. + * Definitions for the code generator. * * * - * Authors: Sarah Walker, - * Miran Grca, + * Authors: Sarah Walker, + * Miran Grca, * - * Copyright 2008-2018 Sarah Walker. - * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -92,7 +92,7 @@ typedef struct codeblock_t int pnt; int ins; - int valid; + int valid; int was_recompiled; int TOP; @@ -353,7 +353,7 @@ static inline void addbyte(uint8_t val) static inline void addword(uint16_t val) { - uint16_t *p = (uint16_t *) &codeblock[block_current].data[block_pos]; + uint16_t *p = (uint16_t *) &codeblock[block_current].data[block_pos]; *p = val; block_pos += 2; if (block_pos >= BLOCK_MAX) @@ -364,7 +364,7 @@ static inline void addword(uint16_t val) static inline void addlong(uint32_t val) { - uint32_t *p = (uint32_t *) &codeblock[block_current].data[block_pos]; + uint32_t *p = (uint32_t *) &codeblock[block_current].data[block_pos]; *p = val; block_pos += 4; if (block_pos >= BLOCK_MAX) @@ -375,7 +375,7 @@ static inline void addlong(uint32_t val) static inline void addquad(uint64_t val) { - uint64_t *p = (uint64_t *) &codeblock[block_current].data[block_pos]; + uint64_t *p = (uint64_t *) &codeblock[block_current].data[block_pos]; *p = val; block_pos += 8; if (block_pos >= BLOCK_MAX) diff --git a/src/codegen/codegen_x86.c b/src/codegen/codegen_x86.c index c104883ef..492328e17 100644 --- a/src/codegen/codegen_x86.c +++ b/src/codegen/codegen_x86.c @@ -1,22 +1,22 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Dynamic Recompiler for Intel 32-bit systems. + * Dynamic Recompiler for Intel 32-bit systems. * * * - * Authors: Fred N. van Kempen, - * Sarah Walker, - * Miran Grca, + * Authors: Fred N. van Kempen, + * Sarah Walker, + * Miran Grca, * - * Copyright 2018 Fred N. van Kempen. - * Copyright 2008-2018 Sarah Walker. - * Copyright 2016-2018 Miran Grca. + * Copyright 2018 Fred N. van Kempen. + * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1402,7 +1402,7 @@ void codegen_block_init(uint32_t phys_addr) block_num = HASH(phys_addr); codeblock_hash[block_num] = &codeblock[block_current]; - block->valid = 1; + block->valid = 1; block->ins = 0; block->pc = cs + cpu_state.pc; block->_cs = cs; @@ -1452,14 +1452,14 @@ void codegen_block_start_recompile(codeblock_t *block) addbyte(0xe8); /*CALL x86gpf*/ addlong((uint32_t)x86gpf - (uint32_t)(&codeblock[block_current].data[block_pos + 4])); #else - addbyte(0xc6); /* mov byte ptr[&(cpu_state.abrt)],ABRT_GPF */ - addbyte(0x05); - addlong((uint32_t) (uintptr_t) &(cpu_state.abrt)); - addbyte(ABRT_GPF); - addbyte(0x31); /* xor eax,eax */ - addbyte(0xc0); - addbyte(0xa3); /* mov [&(abrt_error)],eax */ - addlong((uint32_t) (uintptr_t) &(abrt_error)); + addbyte(0xc6); /* mov byte ptr[&(cpu_state.abrt)],ABRT_GPF */ + addbyte(0x05); + addlong((uint32_t) (uintptr_t) &(cpu_state.abrt)); + addbyte(ABRT_GPF); + addbyte(0x31); /* xor eax,eax */ + addbyte(0xc0); + addbyte(0xa3); /* mov [&(abrt_error)],eax */ + addlong((uint32_t) (uintptr_t) &(abrt_error)); #endif block_pos = BLOCK_EXIT_OFFSET; /*Exit code*/ addbyte(0x83); /*ADDL $16,%esp*/ @@ -2036,8 +2036,8 @@ generate_call: then reverse it for subsequent instructions if the jump is not taken*/ int jump_cycles = 0; - if (codegen_timing_jump_cycles != NULL) - jump_cycles = codegen_timing_jump_cycles(); + if (codegen_timing_jump_cycles != NULL) + jump_cycles = codegen_timing_jump_cycles(); if (jump_cycles) codegen_accumulate(ACCREG_cycles, -jump_cycles); @@ -2066,13 +2066,13 @@ generate_call: codegen_endpc = (cs + cpu_state.pc) + 8; #ifdef CHECK_INT - /* Check for interrupts. */ - addbyte(0xf6); /* test byte ptr[&pic_pending],1 */ - addbyte(0x05); - addlong((uint32_t) (uintptr_t) &pic_pending); - addbyte(0x01); - addbyte(0x0F); addbyte(0x85); /*JNZ 0*/ - addlong((uint32_t)&block->data[BLOCK_EXIT_OFFSET] - (uint32_t)(&block->data[block_pos + 4])); + /* Check for interrupts. */ + addbyte(0xf6); /* test byte ptr[&pic_pending],1 */ + addbyte(0x05); + addlong((uint32_t) (uintptr_t) &pic_pending); + addbyte(0x01); + addbyte(0x0F); addbyte(0x85); /*JNZ 0*/ + addlong((uint32_t)&block->data[BLOCK_EXIT_OFFSET] - (uint32_t)(&block->data[block_pos + 4])); #endif return; @@ -2087,7 +2087,7 @@ generate_call: addbyte(0xC6); /*MOVB [ssegs],op_ssegs*/ addbyte(0x45); addbyte((uint8_t)cpu_state_offset(ssegs)); - addbyte(op_pc + pc_off); + addbyte(op_pc + pc_off); } if (!test_modrm || @@ -2130,7 +2130,7 @@ generate_call: addbyte(0xC7); /*MOVL pc,new_pc*/ addbyte(0x45); addbyte((uint8_t)cpu_state_offset(pc)); - addlong(op_pc + pc_off); + addlong(op_pc + pc_off); addbyte(0xC7); /*MOVL $old_pc,(oldpc)*/ addbyte(0x45); @@ -2159,10 +2159,10 @@ generate_call: block->ins++; #ifdef CHECK_INT - /* Check for interrupts. */ - addbyte(0x0a); /* or al,byte ptr[&pic_pending] */ - addbyte(0x05); - addlong((uint32_t) (uintptr_t) &pic_pending); + /* Check for interrupts. */ + addbyte(0x0a); /* or al,byte ptr[&pic_pending] */ + addbyte(0x05); + addlong((uint32_t) (uintptr_t) &pic_pending); #endif addbyte(0x09); /*OR %eax, %eax*/ diff --git a/src/cpu/codegen_public.h b/src/cpu/codegen_public.h index 868bc41ab..18f0618b8 100644 --- a/src/cpu/codegen_public.h +++ b/src/cpu/codegen_public.h @@ -1,18 +1,18 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the code generator. + * Definitions for the code generator. * * * - * Authors: Miran Grca, + * Authors: Miran Grca, * - * Copyright 2020 Miran Grca. + * Copyright 2020 Miran Grca. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,15 +50,15 @@ #endif -extern void codegen_init(); +extern void codegen_init(); #ifdef USE_NEW_DYNAREC -extern void codegen_close(); +extern void codegen_close(); #endif -extern void codegen_flush(); +extern void codegen_flush(); /*Current physical page of block being recompiled. -1 if no recompilation taking place */ -extern uint32_t recomp_page; +extern uint32_t recomp_page; extern int codegen_in_recompile; #endif diff --git a/src/cpu/x86_ops.h b/src/cpu/x86_ops.h index 6afac81f2..bb540ea22 100644 --- a/src/cpu/x86_ops.h +++ b/src/cpu/x86_ops.h @@ -1,22 +1,22 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Miscellaneous x86 CPU Instructions. + * Miscellaneous x86 CPU Instructions. * * * - * Authors: Fred N. van Kempen, - * Sarah Walker, - * Miran Grca, + * Authors: Fred N. van Kempen, + * Sarah Walker, + * Miran Grca, * - * Copyright 2018 Fred N. van Kempen. - * Copyright 2008-2018 Sarah Walker. - * Copyright 2016-2018 Miran Grca. + * Copyright 2018 Fred N. van Kempen. + * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,15 +40,15 @@ #define _X86_OPS_H -#define UN_USED(x) (void)(x) +#define UN_USED(x) (void)(x) typedef int (*OpFn)(uint32_t fetchdat); #ifdef USE_DYNAREC void x86_setopcodes(const OpFn *opcodes, const OpFn *opcodes_0f, - const OpFn *dynarec_opcodes, - const OpFn *dynarec_opcodes_0f); + const OpFn *dynarec_opcodes, + const OpFn *dynarec_opcodes_0f); extern const OpFn *x86_dynarec_opcodes; extern const OpFn *x86_dynarec_opcodes_0f; diff --git a/src/device.c b/src/device.c index 6b52ec3b1..ef0b59b2b 100644 --- a/src/device.c +++ b/src/device.c @@ -1,23 +1,23 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the generic device interface to handle - * all devices attached to the emulator. + * Implementation of the generic device interface to handle + * all devices attached to the emulator. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017-2019 Fred N. van Kempen. - * Copyright 2016-2019 Miran Grca. - * Copyright 2008-2019 Sarah Walker. + * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2016-2019 Miran Grca. + * Copyright 2008-2019 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/device/isamem.c b/src/device/isamem.c index 512289716..00e8bd8e7 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -1,60 +1,60 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of a memory expansion board for the ISA Bus. + * Implementation of a memory expansion board for the ISA Bus. * - * Although modern systems use direct-connect local buses to - * connect the CPU with its memory, originally the main system - * bus(es) were used for that. Memory expension cards could add - * memory to the system through the ISA bus, using a variety of - * techniques. + * Although modern systems use direct-connect local buses to + * connect the CPU with its memory, originally the main system + * bus(es) were used for that. Memory expension cards could add + * memory to the system through the ISA bus, using a variety of + * techniques. * - * The majority of these boards could provide some (additional) - * conventional (low) memory, extended (high) memory on 80286 - * and higher systems, as well as EMS bank-switched memory. + * The majority of these boards could provide some (additional) + * conventional (low) memory, extended (high) memory on 80286 + * and higher systems, as well as EMS bank-switched memory. * - * This implementation uses the LIM 3.2 specifications for EMS. + * This implementation uses the LIM 3.2 specifications for EMS. * - * With the EMS method, the system's standard memory is expanded - * by means of bank-switching. One or more 'frames' in the upper - * memory area (640K-1024K) are used as viewports into an array - * of RAM pages numbered 0 to N. Each page is defined to be 16KB - * in size, so, for a 1024KB board, 64 such pages are available. - * I/O control registers are used to set up the mappings. More - * modern boards even have multiple 'copies' of those registers, - * which can be switched very fast, to allow for multitasking. + * With the EMS method, the system's standard memory is expanded + * by means of bank-switching. One or more 'frames' in the upper + * memory area (640K-1024K) are used as viewports into an array + * of RAM pages numbered 0 to N. Each page is defined to be 16KB + * in size, so, for a 1024KB board, 64 such pages are available. + * I/O control registers are used to set up the mappings. More + * modern boards even have multiple 'copies' of those registers, + * which can be switched very fast, to allow for multitasking. * - * TODO: The EV159 is supposed to support 16b EMS transfers, but the - * EMM.sys driver for it doesn't seem to want to do that.. + * TODO: The EV159 is supposed to support 16b EMS transfers, but the + * EMM.sys driver for it doesn't seem to want to do that.. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2018 Fred N. van Kempen. + * Copyright 2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/device/isartc.c b/src/device/isartc.c index c87a48f11..029a5067d 100644 --- a/src/device/isartc.c +++ b/src/device/isartc.c @@ -1,56 +1,56 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of a Clock/RTC Card for the ISA PC/XT. + * Implementation of a Clock/RTC Card for the ISA PC/XT. * - * Systems starting with the PC/XT had, by default, a realtime - * clock and NVR chip on the mainboard. The BIOS stored config - * data in the NVR, and the system could maintain time and date - * using the RTC. + * Systems starting with the PC/XT had, by default, a realtime + * clock and NVR chip on the mainboard. The BIOS stored config + * data in the NVR, and the system could maintain time and date + * using the RTC. * - * Originally, PC systems did not have this, and they first did - * show up in non-IBM clone systems. Shortly after, expansion - * cards with this function became available for the PC's (ISA) - * bus, and they came in many forms and designs. + * Originally, PC systems did not have this, and they first did + * show up in non-IBM clone systems. Shortly after, expansion + * cards with this function became available for the PC's (ISA) + * bus, and they came in many forms and designs. * - * This implementation offers some of those boards: + * This implementation offers some of those boards: * - * Everex EV-170 (using NatSemi MM58167 chip) - * DTK PII-147 Hexa I/O Plus (using UMC 82C8167 chip) + * Everex EV-170 (using NatSemi MM58167 chip) + * DTK PII-147 Hexa I/O Plus (using UMC 82C8167 chip) * - * and more will follow as time permits. + * and more will follow as time permits. * - * NOTE: The IRQ functionalities have been implemented, but not yet - * tested, as I need to write test software for them first :) + * NOTE: The IRQ functionalities have been implemented, but not yet + * tested, as I need to write test software for them first :) * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2018 Fred N. van Kempen. + * Copyright 2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -113,9 +113,9 @@ typedef struct { } rtcdev_t; /************************************************************************ - * * - * Driver for the NatSemi MM58167 chip. * - * * + * * + * Driver for the NatSemi MM58167 chip. * + * * ************************************************************************/ #define MM67_REGS 32 @@ -482,9 +482,9 @@ mm67_write(uint16_t port, uint8_t val, void *priv) } /************************************************************************ - * * - * Generic code for all supported chips. * - * * + * * + * Generic code for all supported chips. * + * * ************************************************************************/ /* Initialize the device for use. */ diff --git a/src/disk/hdc_xta.c b/src/disk/hdc_xta.c index a0ae17bcb..4b98551a1 100644 --- a/src/disk/hdc_xta.c +++ b/src/disk/hdc_xta.c @@ -1,76 +1,76 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of a generic IDE-XTA disk controller. + * Implementation of a generic IDE-XTA disk controller. * - * XTA is the acronym for 'XT-Attached', which was basically - * the XT-counterpart to what we know now as IDE (which is - * also named ATA - AT Attachment.) The basic ideas was to - * put the actual drive controller electronics onto the drive - * itself, and have the host machine just talk to that using - * a simpe, standardized I/O path- hence the name IDE, for - * Integrated Drive Electronics. + * XTA is the acronym for 'XT-Attached', which was basically + * the XT-counterpart to what we know now as IDE (which is + * also named ATA - AT Attachment.) The basic ideas was to + * put the actual drive controller electronics onto the drive + * itself, and have the host machine just talk to that using + * a simpe, standardized I/O path- hence the name IDE, for + * Integrated Drive Electronics. * - * In the ATA version of IDE, the programming interface of - * the IBM PC/AT (which used the Western Digitial 1002/1003 - * controllers) was kept, and, so, ATA-IDE assumes a 16bit - * data path: it reads and writes 16bit words of data. The - * disk drives for this bus commonly have an 'A' suffix to - * identify them as 'ATBUS'. + * In the ATA version of IDE, the programming interface of + * the IBM PC/AT (which used the Western Digitial 1002/1003 + * controllers) was kept, and, so, ATA-IDE assumes a 16bit + * data path: it reads and writes 16bit words of data. The + * disk drives for this bus commonly have an 'A' suffix to + * identify them as 'ATBUS'. * - * In XTA-IDE, which is slightly older, the programming - * interface of the IBM PC/XT (which used the MFM controller - * from Xebec) was kept, and, so, it uses an 8bit data path. - * Disk drives for this bus commonly have the 'X' suffix to - * mark them as being for this XTBUS variant. + * In XTA-IDE, which is slightly older, the programming + * interface of the IBM PC/XT (which used the MFM controller + * from Xebec) was kept, and, so, it uses an 8bit data path. + * Disk drives for this bus commonly have the 'X' suffix to + * mark them as being for this XTBUS variant. * - * So, XTA and ATA try to do the same thing, but they use - * different ways to achive their goal. + * So, XTA and ATA try to do the same thing, but they use + * different ways to achive their goal. * - * Also, XTA is **not** the same as XTIDE. XTIDE is a modern - * variant of ATA-IDE, but retro-fitted for use on 8bit XT - * systems: an extra register is used to deal with the extra - * data byte per transfer. XTIDE uses regular IDE drives, - * and uses the regular ATA/IDE programming interface, just - * with the extra register. + * Also, XTA is **not** the same as XTIDE. XTIDE is a modern + * variant of ATA-IDE, but retro-fitted for use on 8bit XT + * systems: an extra register is used to deal with the extra + * data byte per transfer. XTIDE uses regular IDE drives, + * and uses the regular ATA/IDE programming interface, just + * with the extra register. * - * NOTE: This driver implements both the 'standard' XTA interface, - * sold by Western Digital as the WDXT-140 (no BIOS) and the - * WDXT-150 (with BIOS), as well as some variants customized - * for specific machines. + * NOTE: This driver implements both the 'standard' XTA interface, + * sold by Western Digital as the WDXT-140 (no BIOS) and the + * WDXT-150 (with BIOS), as well as some variants customized + * for specific machines. * - * NOTE: The XTA interface is 0-based for sector numbers !! + * NOTE: The XTA interface is 0-based for sector numbers !! * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Based on my earlier HD20 driver for the EuroPC. + * Based on my earlier HD20 driver for the EuroPC. * - * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2017,2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -122,14 +122,14 @@ enum { /* Command values. */ #define CMD_TEST_READY 0x00 #define CMD_RECALIBRATE 0x01 -/* unused 0x02 */ +/* unused 0x02 */ #define CMD_READ_SENSE 0x03 #define CMD_FORMAT_DRIVE 0x04 #define CMD_READ_VERIFY 0x05 #define CMD_FORMAT_TRACK 0x06 #define CMD_FORMAT_BAD_TRACK 0x07 #define CMD_READ_SECTORS 0x08 -/* unused 0x09 */ +/* unused 0x09 */ #define CMD_WRITE_SECTORS 0x0a #define CMD_SEEK 0x0b #define CMD_SET_DRIVE_PARAMS 0x0c @@ -137,8 +137,8 @@ enum { #define CMD_READ_SECTOR_BUFFER 0x0e #define CMD_WRITE_SECTOR_BUFFER 0x0f #define CMD_RAM_DIAGS 0xe0 -/* unused 0xe1 */ -/* unused 0xe2 */ +/* unused 0xe1 */ +/* unused 0xe2 */ #define CMD_DRIVE_DIAGS 0xe3 #define CMD_CTRL_DIAGS 0xe4 #define CMD_READ_LONG 0xe5 @@ -184,20 +184,20 @@ enum { /* The device control block (6 bytes) */ #pragma pack(push, 1) typedef struct { - uint8_t cmd; /* [7:5] class, [4:0] opcode */ + uint8_t cmd; /* [7:5] class, [4:0] opcode */ - uint8_t head : 5, /* [4:0] head number */ - drvsel : 1, /* [5] drive select */ - mbz : 2; /* [7:6] 00 */ + uint8_t head : 5, /* [4:0] head number */ + drvsel : 1, /* [5] drive select */ + mbz : 2; /* [7:6] 00 */ - uint8_t sector : 6, /* [5:0] sector number 0-63 */ - cyl_high : 2; /* [7:6] cylinder [9:8] bits */ + uint8_t sector : 6, /* [5:0] sector number 0-63 */ + cyl_high : 2; /* [7:6] cylinder [9:8] bits */ - uint8_t cyl_low; /* [7:0] cylinder [7:0] bits */ + uint8_t cyl_low; /* [7:0] cylinder [7:0] bits */ - uint8_t count; /* [7:0] blk count / interleave */ + uint8_t count; /* [7:0] blk count / interleave */ - uint8_t ctrl; /* [7:0] control field */ + uint8_t ctrl; /* [7:0] control field */ } dcb_t; #pragma pack(pop) @@ -246,8 +246,8 @@ typedef struct { /* Controller state. */ int8_t state; /* controller state */ - uint8_t sense; /* current SENSE ERROR value */ - uint8_t status; /* current operational status */ + uint8_t sense; /* current SENSE ERROR value */ + uint8_t status; /* current operational status */ uint8_t intr; uint64_t callback; pc_timer_t timer; diff --git a/src/floppy/fdc_pii15xb.c b/src/floppy/fdc_pii15xb.c index cd1650c7a..e0cfb58cd 100644 --- a/src/floppy/fdc_pii15xb.c +++ b/src/floppy/fdc_pii15xb.c @@ -1,48 +1,48 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the DTK MiniMicro series of Floppy Disk Controllers. - * Original code from VARCem. Fully rewritten, fixed and improved for 86Box. + * Implementation of the DTK MiniMicro series of Floppy Disk Controllers. + * Original code from VARCem. Fully rewritten, fixed and improved for 86Box. * - * Author: Fred N. van Kempen, , + * Authors: Fred N. van Kempen, , * Tiseno100 * - * Copyright 2019 Fred N. van Kempen. - * Copyright 2021 Tiseno100 + * Copyright 2019 Fred N. van Kempen. + * Copyright 2021 Tiseno100 * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ diff --git a/src/floppy/fdd_json.c b/src/floppy/fdd_json.c index 204490a67..104f49448 100644 --- a/src/floppy/fdd_json.c +++ b/src/floppy/fdd_json.c @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the PCjs JSON floppy image format. + * Implementation of the PCjs JSON floppy image format. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2017-2019 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -88,7 +88,7 @@ typedef struct { uint8_t dmf; /* disk is DMF format */ uint8_t interleave; #if 0 - uint8_t skew; + uint8_t skew; #endif uint8_t gap2_len; uint8_t gap3_len; diff --git a/src/game/joystick_ch_flightstick_pro.c b/src/game/joystick_ch_flightstick_pro.c index 4d0830015..2a6c52a7d 100644 --- a/src/game/joystick_ch_flightstick_pro.c +++ b/src/game/joystick_ch_flightstick_pro.c @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the Flight Stick Pro. + * Implementation of the Flight Stick Pro. * * * - * Authors: Miran Grca, - * Sarah Walker, + * Authors: Miran Grca, + * Sarah Walker, * - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/game/joystick_standard.c b/src/game/joystick_standard.c index 9b3ab8236..fa3b3e2e5 100644 --- a/src/game/joystick_standard.c +++ b/src/game/joystick_standard.c @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of a standard joystick. + * Implementation of a standard joystick. * * * - * Authors: Miran Grca, - * Sarah Walker, + * Authors: Miran Grca, + * Sarah Walker, * - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/game/joystick_sw_pad.c b/src/game/joystick_sw_pad.c index 841f7e68d..8f4c804e2 100644 --- a/src/game/joystick_sw_pad.c +++ b/src/game/joystick_sw_pad.c @@ -1,41 +1,41 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of a Side Winder GamePad. + * Implementation of a Side Winder GamePad. * - * Notes: - Write to 0x201 starts packet transfer (5*N or 15*N bits) - * - Currently alternates between Mode A and Mode B (is there - * any way of actually controlling which is used?) - * - Windows 9x drivers require Mode B when more than 1 pad - * connected - * - Packet preceeded by high data (currently 50us), and - * followed by low data (currently 160us) - timings are - * probably wrong, but good enough for everything I've tried - * - Analog inputs are only used to time ID packet request. - * If A0 timing out is followed after ~64us by another 0x201 - * write then an ID packet is triggered - * - Sidewinder game pad ID is 'H0003' - * - ID is sent in Mode A (1 bit per clock), but data bit 2 - * must change during ID packet transfer, or Windows 9x - * drivers won't use Mode B. I don't know if it oscillates, - * mirrors the data transfer, or something else - the drivers - * only check that it changes at least 10 times during the - * transfer - * - Some DOS stuff will write to 0x201 while a packet is - * being transferred. This seems to be ignored. + * Notes: - Write to 0x201 starts packet transfer (5*N or 15*N bits) + * - Currently alternates between Mode A and Mode B (is there + * any way of actually controlling which is used?) + * - Windows 9x drivers require Mode B when more than 1 pad + * connected + * - Packet preceeded by high data (currently 50us), and + * followed by low data (currently 160us) - timings are + * probably wrong, but good enough for everything I've tried + * - Analog inputs are only used to time ID packet request. + * If A0 timing out is followed after ~64us by another 0x201 + * write then an ID packet is triggered + * - Sidewinder game pad ID is 'H0003' + * - ID is sent in Mode A (1 bit per clock), but data bit 2 + * must change during ID packet transfer, or Windows 9x + * drivers won't use Mode B. I don't know if it oscillates, + * mirrors the data transfer, or something else - the drivers + * only check that it changes at least 10 times during the + * transfer + * - Some DOS stuff will write to 0x201 while a packet is + * being transferred. This seems to be ignored. * * * - * Authors: Miran Grca, - * Sarah Walker, + * Authors: Miran Grca, + * Sarah Walker, * - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/game/joystick_tm_fcs.c b/src/game/joystick_tm_fcs.c index 23683b26b..63ebdbda8 100644 --- a/src/game/joystick_tm_fcs.c +++ b/src/game/joystick_tm_fcs.c @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of Thrust Master Flight Control System. + * Implementation of Thrust Master Flight Control System. * * * - * Authors: Miran Grca, - * Sarah Walker, + * Authors: Miran Grca, + * Sarah Walker, * - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/bswap.h b/src/include/86box/bswap.h index 9683c395d..b943dd2d8 100644 --- a/src/include/86box/bswap.h +++ b/src/include/86box/bswap.h @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Various definitions for portable byte-swapping. + * Various definitions for portable byte-swapping. * * * - * Authors: Fred N. van Kempen, - * neozeed, + * Authors: Fred N. van Kempen, + * neozeed, * - * Copyright 2017,2018 Fred N. van Kempen. - * Copyright 2016-2018 neozeed. + * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2016-2018 neozeed. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,34 +44,34 @@ #include #else # define bswap_16(x) \ - ( \ - ((uint16_t)( \ - (((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \ - (((uint16_t)(x) & (uint16_t)0xff00U) >> 8) )) \ - ) + ( \ + ((uint16_t)( \ + (((uint16_t)(x) & (uint16_t)0x00ffU) << 8) | \ + (((uint16_t)(x) & (uint16_t)0xff00U) >> 8) )) \ + ) # define bswap_32(x) \ - ( \ - ((uint32_t)( \ - (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \ - (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \ - (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \ - (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) )) \ - ) + ( \ + ((uint32_t)( \ + (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \ + (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \ + (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \ + (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24) )) \ + ) # define bswap_64(x) \ - ( \ - ((uint64_t)( \ - (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000000000ffULL) << 56) | \ - (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000000000ff00ULL) << 40) | \ - (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \ - (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000ff000000ULL) << 8) | \ - (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000ff00000000ULL) >> 8) | \ - (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \ - (uint64_t)(((uint64_t)(x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \ - (uint64_t)(((uint64_t)(x) & (uint64_t)0xff00000000000000ULL) >> 56) )) \ - ) -#endif /*HAVE_BYTESWAP_H*/ + ( \ + ((uint64_t)( \ + (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000000000ffULL) << 56) | \ + (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000000000ff00ULL) << 40) | \ + (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000000000ff0000ULL) << 24) | \ + (uint64_t)(((uint64_t)(x) & (uint64_t)0x00000000ff000000ULL) << 8) | \ + (uint64_t)(((uint64_t)(x) & (uint64_t)0x000000ff00000000ULL) >> 8) | \ + (uint64_t)(((uint64_t)(x) & (uint64_t)0x0000ff0000000000ULL) >> 24) | \ + (uint64_t)(((uint64_t)(x) & (uint64_t)0x00ff000000000000ULL) >> 40) | \ + (uint64_t)(((uint64_t)(x) & (uint64_t)0xff00000000000000ULL) >> 56) )) \ + ) +#endif /*HAVE_BYTESWAP_H*/ #if defined __has_builtin && __has_builtin(__builtin_bswap16) #define bswap16(x) __builtin_bswap16(x) diff --git a/src/include/86box/device.h b/src/include/86box/device.h index ee983be4b..a8d100acc 100644 --- a/src/include/86box/device.h +++ b/src/include/86box/device.h @@ -1,22 +1,22 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the device handler. + * Definitions for the device handler. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017-2019 Fred N. van Kempen. - * Copyright 2016-2019 Miran Grca. - * Copyright 2008-2019 Sarah Walker. + * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2016-2019 Miran Grca. + * Copyright 2008-2019 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/dma.h b/src/include/86box/dma.h index 5e36daee4..f7a516a61 100644 --- a/src/include/86box/dma.h +++ b/src/include/86box/dma.h @@ -1,22 +1,22 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the Intel DMA controller. + * Definitions for the Intel DMA controller. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017-2020 Fred N. van Kempen. - * Copyright 2016-2020 Miran Grca. - * Copyright 2008-2020 Sarah Walker. + * Copyright 2017-2020 Fred N. van Kempen. + * Copyright 2016-2020 Miran Grca. + * Copyright 2008-2020 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/fdd_json.h b/src/include/86box/fdd_json.h index 8924ca96a..99b12f816 100644 --- a/src/include/86box/fdd_json.h +++ b/src/include/86box/fdd_json.h @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the PCjs JSON floppy image format. + * Definitions for the PCjs JSON floppy image format. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2017,2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/include/86box/isamem.h b/src/include/86box/isamem.h index 917369fb6..3603d368f 100644 --- a/src/include/86box/isamem.h +++ b/src/include/86box/isamem.h @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the ISAMEM cards. + * Definitions for the ISAMEM cards. * * * - * Authors: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2018 Fred N. van Kempen. + * Copyright 2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/include/86box/isartc.h b/src/include/86box/isartc.h index d6b7d0d35..1df787f67 100644 --- a/src/include/86box/isartc.h +++ b/src/include/86box/isartc.h @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the ISARTC cards. + * Definitions for the ISARTC cards. * * * - * Authors: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2018 Fred N. van Kempen. + * Copyright 2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/include/86box/joystick_standard.h b/src/include/86box/joystick_standard.h index f26a34dc4..ac2b7ea3f 100644 --- a/src/include/86box/joystick_standard.h +++ b/src/include/86box/joystick_standard.h @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the joystick driver. + * Definitions for the joystick driver. * * * - * Authors: Miran Grca, - * Sarah Walker, + * Authors: Miran Grca, + * Sarah Walker, * - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/joystick_sw_pad.h b/src/include/86box/joystick_sw_pad.h index 1f95ab3f9..d5aef7ccb 100644 --- a/src/include/86box/joystick_sw_pad.h +++ b/src/include/86box/joystick_sw_pad.h @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the Sidewinder Pro driver. + * Definitions for the Sidewinder Pro driver. * * * - * Authors: Miran Grca, - * Sarah Walker, + * Authors: Miran Grca, + * Sarah Walker, * - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/joystick_tm_fcs.h b/src/include/86box/joystick_tm_fcs.h index 0d5ae4c4e..74b3edd2e 100644 --- a/src/include/86box/joystick_tm_fcs.h +++ b/src/include/86box/joystick_tm_fcs.h @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the Flight Control System driver. + * Definitions for the Flight Control System driver. * * * - * Authors: Miran Grca, - * Sarah Walker, + * Authors: Miran Grca, + * Sarah Walker, * - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/keyboard.h b/src/include/86box/keyboard.h index b310e1553..d0498f970 100644 --- a/src/include/86box/keyboard.h +++ b/src/include/86box/keyboard.h @@ -1,22 +1,22 @@ /* - * 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 - * system designs based on the PCI bus. + * 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 + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Definitions for the keyboard interface. + * Definitions for the keyboard interface. * * * - * Authors: Sarah Walker, - * Miran Grca, - * Fred N. van Kempen, + * Authors: Sarah Walker, + * Miran Grca, + * Fred N. van Kempen, * - * Copyright 2008-2019 Sarah Walker. - * Copyright 2016-2019 Miran Grca. - * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2008-2019 Sarah Walker. + * Copyright 2016-2019 Miran Grca. + * Copyright 2017-2019 Fred N. van Kempen. */ #ifndef EMU_KEYBOARD_H diff --git a/src/include/86box/m_at_t3100e.h b/src/include/86box/m_at_t3100e.h index ec45d1254..aa545fc45 100644 --- a/src/include/86box/m_at_t3100e.h +++ b/src/include/86box/m_at_t3100e.h @@ -1,22 +1,22 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the Toshiba T3100e system. + * Definitions for the Toshiba T3100e system. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017,2018 Fred N. van Kempen. - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/m_xt_t1000.h b/src/include/86box/m_xt_t1000.h index 056e5bebf..452decc21 100644 --- a/src/include/86box/m_xt_t1000.h +++ b/src/include/86box/m_xt_t1000.h @@ -1,22 +1,22 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the Toshiba T1000/T1200 machines. + * Definitions for the Toshiba T1000/T1200 machines. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017,2018 Fred N. van Kempen. - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/net_ne2000.h b/src/include/86box/net_ne2000.h index 9989c1673..73b5bd67d 100644 --- a/src/include/86box/net_ne2000.h +++ b/src/include/86box/net_ne2000.h @@ -1,18 +1,18 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the NE2000 ethernet controller. + * Definitions for the NE2000 ethernet controller. * * * - * Authors: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2017,2018 Fred N. van Kempen. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/network.h b/src/include/86box/network.h index 04dbc4b25..77bfa37a4 100644 --- a/src/include/86box/network.h +++ b/src/include/86box/network.h @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the network module. + * Definitions for the network module. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2017-2019 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/include/86box/nvr.h b/src/include/86box/nvr.h index d10191a79..a4bf93056 100644 --- a/src/include/86box/nvr.h +++ b/src/include/86box/nvr.h @@ -1,38 +1,38 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the generic NVRAM/CMOS driver. + * Definitions for the generic NVRAM/CMOS driver. * * * - * Author: Fred N. van Kempen, , - * David Hrdlička, + * Authors: Fred N. van Kempen, , + * David Hrdlička, * - * Copyright 2017-2020 Fred N. van Kempen. - * Copyright 2018-2020 David Hrdlička. + * Copyright 2017-2020 Fred N. van Kempen. + * Copyright 2018-2020 David Hrdlička. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/include/86box/nvr_ps2.h b/src/include/86box/nvr_ps2.h index 47e2a349c..9fd0a7897 100644 --- a/src/include/86box/nvr_ps2.h +++ b/src/include/86box/nvr_ps2.h @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the PS/2 cmos/nvr device. + * Definitions for the PS/2 cmos/nvr device. * * * - * Authors: Fred N. van Kempen, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Sarah Walker, * - * Copyright 2017,2018 Fred N. van Kempen. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/include/86box/png_struct.h b/src/include/86box/png_struct.h index 1b5d9e851..8bc77c455 100644 --- a/src/include/86box/png_struct.h +++ b/src/include/86box/png_struct.h @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the centralized PNG image handler. + * Definitions for the centralized PNG image handler. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2018 Fred N. van Kempen. + * Copyright 2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/include/86box/printer.h b/src/include/86box/printer.h index 37308e908..c8d300283 100644 --- a/src/include/86box/printer.h +++ b/src/include/86box/printer.h @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Definitions for the printers module. + * Definitions for the printers module. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2018 Fred N. van Kempen. + * Copyright 2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 62a424c6a..24ecdbd1c 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -1,22 +1,22 @@ /* * 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 - * system designs based on the PCI bus. + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. * - * This file is part of the 86Box distribution. + * This file is part of the 86Box distribution. * - * Definitions for the video controller module. + * Definitions for the video controller module. * * * - * Authors: Sarah Walker, - * Miran Grca, - * Fred N. van Kempen, + * Authors: Sarah Walker, + * Miran Grca, + * Fred N. van Kempen, * - * Copyright 2008-2019 Sarah Walker. - * Copyright 2016-2019 Miran Grca. - * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2008-2019 Sarah Walker. + * Copyright 2016-2019 Miran Grca. + * Copyright 2017-2019 Fred N. van Kempen. */ #ifndef EMU_VIDEO_H diff --git a/src/machine/m_at.c b/src/machine/m_at.c index c4c566f98..ccee2f1e7 100644 --- a/src/machine/m_at.c +++ b/src/machine/m_at.c @@ -1,22 +1,22 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Standard PC/AT implementation. + * Standard PC/AT implementation. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017-2020 Fred N. van Kempen. - * Copyright 2016-2020 Miran Grca. - * Copyright 2008-2020 Sarah Walker. + * Copyright 2017-2020 Fred N. van Kempen. + * Copyright 2016-2020 Miran Grca. + * Copyright 2008-2020 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/machine/m_at_commodore.c b/src/machine/m_at_commodore.c index a40fa2797..a83fda08e 100644 --- a/src/machine/m_at_commodore.c +++ b/src/machine/m_at_commodore.c @@ -1,22 +1,22 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the Commodore PC3 system. + * Implementation of the Commodore PC3 system. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017,2018 Fred N. van Kempen. - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/machine/m_at_t3100e.c b/src/machine/m_at_t3100e.c index 4757ea99a..dbfcb2604 100644 --- a/src/machine/m_at_t3100e.c +++ b/src/machine/m_at_t3100e.c @@ -1,131 +1,131 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the Toshiba T3100e. + * Implementation of the Toshiba T3100e. * - * The Toshiba 3100e is a 286-based portable. + * The Toshiba 3100e is a 286-based portable. * - * To bring up the BIOS setup screen hold down the 'Fn' key - * on booting. + * To bring up the BIOS setup screen hold down the 'Fn' key + * on booting. * - * Memory management - * ~~~~~~~~~~~~~~~~~ + * Memory management + * ~~~~~~~~~~~~~~~~~ * - * Motherboard memory is divided into: - * - Conventional memory: Either 512k or 640k - * - Upper memory: Either 512k or 384k, depending on - * amount of conventional memory. - * Upper memory can be used as EMS or XMS. - * - High memory: 0-4Mb, depending on RAM installed. - * The BIOS setup screen allows some or - * all of this to be used as EMS; the - * remainder is XMS. + * Motherboard memory is divided into: + * - Conventional memory: Either 512k or 640k + * - Upper memory: Either 512k or 384k, depending on + * amount of conventional memory. + * Upper memory can be used as EMS or XMS. + * - High memory: 0-4Mb, depending on RAM installed. + * The BIOS setup screen allows some or + * all of this to be used as EMS; the + * remainder is XMS. * - * Additional memory (either EMS or XMS) can also be provided - * by ISA expansion cards. + * Additional memory (either EMS or XMS) can also be provided + * by ISA expansion cards. * - * Under test in PCem, the BIOS will boot with up to 65368Kb - * of memory in total (16Mb less 16k). However it will give - * an error with RAM sizes above 8Mb, if any of the high - * memory is allocated as EMS, because the builtin EMS page - * registers can only access up to 8Mb. + * Under test in PCem, the BIOS will boot with up to 65368Kb + * of memory in total (16Mb less 16k). However it will give + * an error with RAM sizes above 8Mb, if any of the high + * memory is allocated as EMS, because the builtin EMS page + * registers can only access up to 8Mb. * - * Memory is controlled by writes to I/O port 8084h: - * Bit 7: Always 0 } - * Bit 6: Always 1 } These bits select which motherboard - * Bit 5: Always 0 } function to access. - * Bit 4: Set to treat upper RAM as XMS - * Bit 3: Enable external RAM boards? - * Bit 2: Set for 640k conventional memory, clear for 512k - * Bit 1: Enable RAM beyond 1Mb. - * Bit 0: Enable EMS. + * Memory is controlled by writes to I/O port 8084h: + * Bit 7: Always 0 } + * Bit 6: Always 1 } These bits select which motherboard + * Bit 5: Always 0 } function to access. + * Bit 4: Set to treat upper RAM as XMS + * Bit 3: Enable external RAM boards? + * Bit 2: Set for 640k conventional memory, clear for 512k + * Bit 1: Enable RAM beyond 1Mb. + * Bit 0: Enable EMS. * - * The last value written to this port is saved at 0040:0093h, - * and in CMOS memory at offset 0x37. If the top bit of the - * CMOS byte is set, then high memory is being provided by - * an add-on card rather than the mainboard; accordingly, - * the BIOS will not allow high memory to be used as EMS. + * The last value written to this port is saved at 0040:0093h, + * and in CMOS memory at offset 0x37. If the top bit of the + * CMOS byte is set, then high memory is being provided by + * an add-on card rather than the mainboard; accordingly, + * the BIOS will not allow high memory to be used as EMS. * - * EMS is controlled by 16 page registers: + * EMS is controlled by 16 page registers: * - * Page mapped at 0xD000 0xD400 0xD800 0xDC00 - * ------------------------------------------------------ - * Pages 0x00-0x7F 0x208 0x4208 0x8208 0xc208 - * Pages 0x80-0xFF 0x218 0x4218 0x8218 0xc218 - * Pages 0x100-0x17F 0x258 0x4258 0x8258 0xc258 - * Pages 0x180-0x1FF 0x268 0x4268 0x8268 0xc268 + * Page mapped at 0xD000 0xD400 0xD800 0xDC00 + * ------------------------------------------------------ + * Pages 0x00-0x7F 0x208 0x4208 0x8208 0xc208 + * Pages 0x80-0xFF 0x218 0x4218 0x8218 0xc218 + * Pages 0x100-0x17F 0x258 0x4258 0x8258 0xc258 + * Pages 0x180-0x1FF 0x268 0x4268 0x8268 0xc268 * - * The value written has bit 7 set to enable EMS, reset to - * disable it. + * The value written has bit 7 set to enable EMS, reset to + * disable it. * - * So: - * OUT 0x208, 0x80 will page in the first 16k page at 0xD0000. - * OUT 0x208, 0x00 will page out EMS, leaving nothing at 0xD0000. - * OUT 0x4208, 0x80 will page in the first 16k page at 0xD4000. - * OUT 0x218, 0x80 will page in the 129th 16k page at 0xD0000. - * etc. + * So: + * OUT 0x208, 0x80 will page in the first 16k page at 0xD0000. + * OUT 0x208, 0x00 will page out EMS, leaving nothing at 0xD0000. + * OUT 0x4208, 0x80 will page in the first 16k page at 0xD4000. + * OUT 0x218, 0x80 will page in the 129th 16k page at 0xD0000. + * etc. * - * To use EMS from DOS, you will need the Toshiba EMS driver - * (TOSHEMM.ZIP). This supports the above system, plus further - * ranges of ports at 0x_2A8, 0x_2B8, 0x_2C8. + * To use EMS from DOS, you will need the Toshiba EMS driver + * (TOSHEMM.ZIP). This supports the above system, plus further + * ranges of ports at 0x_2A8, 0x_2B8, 0x_2C8. * - * Features not implemented: - * > Four video fonts. - * > BIOS-controlled mapping of serial ports to IRQs. - * > Custom keyboard controller. This has a number of extra - * commands in the 0xB0-0xBC range, for such things as turbo - * on/off, and switching the keyboard between AT and PS/2 - * modes. Currently I have only implemented command 0xBB, - * so that self-test completes successfully. Commands include: + * Features not implemented: + * > Four video fonts. + * > BIOS-controlled mapping of serial ports to IRQs. + * > Custom keyboard controller. This has a number of extra + * commands in the 0xB0-0xBC range, for such things as turbo + * on/off, and switching the keyboard between AT and PS/2 + * modes. Currently I have only implemented command 0xBB, + * so that self-test completes successfully. Commands include: * - * 0xB0: Turbo on - * 0xB1: Turbo off - * 0xB2: Internal display on? - * 0xB3: Internal display off? - * 0xB5: Get settings byte (bottom bit is color/mono setting) - * 0xB6: Set settings byte - * 0xB7: Behave as 101-key PS/2 keyboard - * 0xB8: Behave as 84-key AT keyboard - * 0xBB: Return a byte, bit 2 is Fn key state, other bits unknown. + * 0xB0: Turbo on + * 0xB1: Turbo off + * 0xB2: Internal display on? + * 0xB3: Internal display off? + * 0xB5: Get settings byte (bottom bit is color/mono setting) + * 0xB6: Set settings byte + * 0xB7: Behave as 101-key PS/2 keyboard + * 0xB8: Behave as 84-key AT keyboard + * 0xBB: Return a byte, bit 2 is Fn key state, other bits unknown. * - * The other main I/O port needed to POST is: - * 0x8084: System control. - * Top 3 bits give command, bottom 5 bits give parameters. - * 000 => set serial port IRQ / addresses - * bit 4: IRQ5 serial port base: 1 => 0x338, 0 => 0x3E8 - * bits 3, 2, 0 specify serial IRQs for COM1, COM2, COM3: - * 00 0 => 4, 3, 5 + * The other main I/O port needed to POST is: + * 0x8084: System control. + * Top 3 bits give command, bottom 5 bits give parameters. + * 000 => set serial port IRQ / addresses + * bit 4: IRQ5 serial port base: 1 => 0x338, 0 => 0x3E8 + * bits 3, 2, 0 specify serial IRQs for COM1, COM2, COM3: + * 00 0 => 4, 3, 5 * 00 1 => 4, 5, 3 * 01 0 => 3, 4, 5 * 01 1 => 3, 5, 4 * 10 0 => 4, -, 3 * 10 1 => 3, -, 4 - * 010 => set memory mappings - * bit 4 set if upper RAM is XMS - * bit 3 enable add-on memory boards beyond 5Mb? - * bit 2 set for 640k sysram, clear for 512k sysram - * bit 1 enable mainboard XMS - * bit 0 enable mainboard EMS - * 100 => set parallel mode / LCD settings - * bit 4 set for bidirectional parallel port - * bit 3 set to disable internal CGA - * bit 2 set for single-pixel LCD font - * bits 0,1 for display font + * 010 => set memory mappings + * bit 4 set if upper RAM is XMS + * bit 3 enable add-on memory boards beyond 5Mb? + * bit 2 set for 640k sysram, clear for 512k sysram + * bit 1 enable mainboard XMS + * bit 0 enable mainboard EMS + * 100 => set parallel mode / LCD settings + * bit 4 set for bidirectional parallel port + * bit 3 set to disable internal CGA + * bit 2 set for single-pixel LCD font + * bits 0,1 for display font * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017,2018 Fred N. van Kempen. - * Copyright 2016-2018 Miran Grca. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2016-2018 Miran Grca. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -486,7 +486,7 @@ t3100e_sys_in(uint16_t addr, void *p) void t3100e_sys_out(uint16_t addr, uint8_t val, void *p) { - // struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)p; + // struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)p; switch (val & 0xE0) { case 0x00: /* Set serial port IRQs. Not implemented */ diff --git a/src/machine/m_at_t3100e_vid.c b/src/machine/m_at_t3100e_vid.c index 84244f09e..7579f3892 100644 --- a/src/machine/m_at_t3100e_vid.c +++ b/src/machine/m_at_t3100e_vid.c @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the Toshiba 3100e plasma display. - * This display has a fixed 640x400 resolution. + * Implementation of the Toshiba 3100e plasma display. + * This display has a fixed 640x400 resolution. * - * T3100e CRTC regs (from the ROM): + * T3100e CRTC regs (from the ROM): * - * Selecting a character height of 3 seems to be sufficient to - * convert the 640x200 graphics mode to 640x400 (and, by - * analogy, 320x200 to 320x400). + * Selecting a character height of 3 seems to be sufficient to + * convert the 640x200 graphics mode to 640x400 (and, by + * analogy, 320x200 to 320x400). * - * Horiz-----> Vert------> I ch - * 38 28 2D 0A 1F 06 19 1C 02 07 06 07 CO40 - * 71 50 5A 0A 1F 06 19 1C 02 07 06 07 CO80 - * 38 28 2D 0A 7F 06 64 70 02 01 06 07 Graphics - * 61 50 52 0F 19 06 19 19 02 0D 0B 0C MONO - * 2D 28 22 0A 67 00 64 67 02 03 06 07 640x400 + * Horiz-----> Vert------> I ch + * 38 28 2D 0A 1F 06 19 1C 02 07 06 07 CO40 + * 71 50 5A 0A 1F 06 19 1C 02 07 06 07 CO80 + * 38 28 2D 0A 7F 06 64 70 02 01 06 07 Graphics + * 61 50 52 0F 19 06 19 19 02 0D 0B 0C MONO + * 2D 28 22 0A 67 00 64 67 02 03 06 07 640x400 * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017-2019 Fred N. van Kempen. - * Copyright 2016-2019 Miran Grca. - * Copyright 2008-2019 Sarah Walker. + * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2016-2019 Miran Grca. + * Copyright 2008-2019 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -561,9 +561,9 @@ t3100e_recalcattrs(t3100e_t *t3100e) * Bit 0: Attributes 01-06, 08-0E are inverse video * Bit 1: Attributes 01-06, 08-0E are bold * Bit 2: Attributes 11-16, 18-1F, 21-26, 28-2F ... F1-F6, F8-FF - * are inverse video + * are inverse video * Bit 3: Attributes 11-16, 18-1F, 21-26, 28-2F ... F1-F6, F8-FF - * are bold */ + * are bold */ /* Set up colours */ amber = makecol(0xf7, 0x7C, 0x34); diff --git a/src/machine/m_ps1_hdc.c b/src/machine/m_ps1_hdc.c index 9492fd696..6ac39d1e6 100644 --- a/src/machine/m_ps1_hdc.c +++ b/src/machine/m_ps1_hdc.c @@ -1,74 +1,74 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the PS/1 Model 2011 disk controller. + * Implementation of the PS/1 Model 2011 disk controller. * - * XTA is the acronym for 'XT-Attached', which was basically - * the XT-counterpart to what we know now as IDE (which is - * also named ATA - AT Attachment.) The basic ideas was to - * put the actual drive controller electronics onto the drive - * itself, and have the host machine just talk to that using - * a simpe, standardized I/O path- hence the name IDE, for - * Integrated Drive Electronics. + * XTA is the acronym for 'XT-Attached', which was basically + * the XT-counterpart to what we know now as IDE (which is + * also named ATA - AT Attachment.) The basic ideas was to + * put the actual drive controller electronics onto the drive + * itself, and have the host machine just talk to that using + * a simpe, standardized I/O path- hence the name IDE, for + * Integrated Drive Electronics. * - * In the ATA version of IDE, the programming interface of - * the IBM PC/AT (which used the Western Digitial 1002/1003 - * controllers) was kept, and, so, ATA-IDE assumes a 16bit - * data path: it reads and writes 16bit words of data. The - * disk drives for this bus commonly have an 'A' suffix to - * identify them as 'ATBUS'. + * In the ATA version of IDE, the programming interface of + * the IBM PC/AT (which used the Western Digitial 1002/1003 + * controllers) was kept, and, so, ATA-IDE assumes a 16bit + * data path: it reads and writes 16bit words of data. The + * disk drives for this bus commonly have an 'A' suffix to + * identify them as 'ATBUS'. * - * In XTA-IDE, which is slightly older, the programming - * interface of the IBM PC/XT (which used the MFM controller - * from Xebec) was kept, and, so, it uses an 8bit data path. - * Disk drives for this bus commonly have the 'X' suffix to - * mark them as being for this XTBUS variant. + * In XTA-IDE, which is slightly older, the programming + * interface of the IBM PC/XT (which used the MFM controller + * from Xebec) was kept, and, so, it uses an 8bit data path. + * Disk drives for this bus commonly have the 'X' suffix to + * mark them as being for this XTBUS variant. * - * So, XTA and ATA try to do the same thing, but they use - * different ways to achive their goal. + * So, XTA and ATA try to do the same thing, but they use + * different ways to achive their goal. * - * Also, XTA is **not** the same as XTIDE. XTIDE is a modern - * variant of ATA-IDE, but retro-fitted for use on 8bit XT - * systems: an extra register is used to deal with the extra - * data byte per transfer. XTIDE uses regular IDE drives, - * and uses the regular ATA/IDE programming interface, just - * with the extra register. + * Also, XTA is **not** the same as XTIDE. XTIDE is a modern + * variant of ATA-IDE, but retro-fitted for use on 8bit XT + * systems: an extra register is used to deal with the extra + * data byte per transfer. XTIDE uses regular IDE drives, + * and uses the regular ATA/IDE programming interface, just + * with the extra register. * - * NOTE: We should probably find a nicer way to integrate our Disk - * Type table with the main code, so the user can only select - * items from that list... + * NOTE: We should probably find a nicer way to integrate our Disk + * Type table with the main code, so the user can only select + * items from that list... * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Based on my earlier HD20 driver for the EuroPC. - * Thanks to Marco Bortolin for the help and feedback !! + * Based on my earlier HD20 driver for the EuroPC. + * Thanks to Marco Bortolin for the help and feedback !! * - * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2017-2019 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -165,56 +165,56 @@ enum { #pragma pack(push, 1) typedef struct { /* Status byte 0. */ - uint8_t track_0 : 1, /* T0 */ - mbz1 : 1, /* 0 */ - mbz2 : 1, /* 0 */ - cylinder_err : 1, /* CE */ - write_fault : 1, /* WF */ - mbz3 : 1, /* 0 */ - seek_end : 1, /* SE */ - not_ready : 1; /* NR */ + uint8_t track_0 : 1, /* T0 */ + mbz1 : 1, /* 0 */ + mbz2 : 1, /* 0 */ + cylinder_err : 1, /* CE */ + write_fault : 1, /* WF */ + mbz3 : 1, /* 0 */ + seek_end : 1, /* SE */ + not_ready : 1; /* NR */ /* Status byte 1. */ - uint8_t id_not_found : 1, /* ID */ - mbz4 : 1, /* 0 */ - mbz5 : 1, /* 0 */ - wrong_cyl : 1, /* WC */ - all_bit_set : 1, /* BT */ - mark_not_found : 1, /* AM */ - ecc_crc_err : 1, /* ET */ - ecc_crc_field : 1; /* EF */ + uint8_t id_not_found : 1, /* ID */ + mbz4 : 1, /* 0 */ + mbz5 : 1, /* 0 */ + wrong_cyl : 1, /* WC */ + all_bit_set : 1, /* BT */ + mark_not_found : 1, /* AM */ + ecc_crc_err : 1, /* ET */ + ecc_crc_field : 1; /* EF */ /* Status byte 2. */ - uint8_t headsel_state : 4, /* headsel state[4] */ - defective_sector : 1, /* DS */ - retried_ok : 1, /* RG */ - need_reset : 1, /* RR */ + uint8_t headsel_state : 4, /* headsel state[4] */ + defective_sector : 1, /* DS */ + retried_ok : 1, /* RG */ + need_reset : 1, /* RR */ #if 1 - valid : 1; /* 0 (abused as VALID) */ + valid : 1; /* 0 (abused as VALID) */ #else - mbz6 : 1; /* 0 */ + mbz6 : 1; /* 0 */ #endif /* Most recent ID field seen. */ - uint8_t last_cyl_low; /* Cyl_Low[8] */ - uint8_t last_head : 4, /* HD[4] */ - mbz7 : 1, /* 0 */ - last_cyl_high : 2, /* Cyl_high[2] */ - last_def_sect : 1; /* DS */ - uint8_t last_sect; /* Sect[8] */ + uint8_t last_cyl_low; /* Cyl_Low[8] */ + uint8_t last_head : 4, /* HD[4] */ + mbz7 : 1, /* 0 */ + last_cyl_high : 2, /* Cyl_high[2] */ + last_def_sect : 1; /* DS */ + uint8_t last_sect; /* Sect[8] */ - uint8_t sect_size; /* Size[8] = 02 */ + uint8_t sect_size; /* Size[8] = 02 */ /* Current position. */ - uint8_t curr_cyl_high : 2, /* Cyl_High_[2] */ - mbz8 : 1, /* 0 */ - mbz9 : 1, /* 0 */ - curr_head : 4; /* HD_2[4] */ - uint8_t curr_cyl_low; /* Cyl_Low_2[8] */ + uint8_t curr_cyl_high : 2, /* Cyl_High_[2] */ + mbz8 : 1, /* 0 */ + mbz9 : 1, /* 0 */ + curr_head : 4; /* HD_2[4] */ + uint8_t curr_cyl_low; /* Cyl_Low_2[8] */ - uint8_t sect_corr; /* sectors corrected */ + uint8_t sect_corr; /* sectors corrected */ - uint8_t retries; /* retries */ + uint8_t retries; /* retries */ /* * This byte shows the progress of the controller through the @@ -235,7 +235,7 @@ typedef struct { * transfer: * * Bit 7 A sector was transferred between the system - * and the sector buffer. + * and the sector buffer. * * Bit 6 A sector was transferred between the controller * and the sector buffer. @@ -249,11 +249,11 @@ typedef struct { * 4. When the transfer is complete, the low nibble equals hex 4 * and the high nibble is unchanged. */ - uint8_t cmd_syndrome; /* command syndrome */ + uint8_t cmd_syndrome; /* command syndrome */ - uint8_t drive_type; /* drive type */ + uint8_t drive_type; /* drive type */ - uint8_t rsvd; /* reserved byte */ + uint8_t rsvd; /* reserved byte */ } ssb_t; #pragma pack(pop) @@ -293,20 +293,20 @@ typedef struct { */ #pragma pack(push, 1) typedef struct { - uint8_t cyl_high : 2, /* cylinder [9:8] bits */ - defective_sector : 1, /* DS */ - mbz1 : 1, /* 0 */ - head : 4; /* head number */ + uint8_t cyl_high : 2, /* cylinder [9:8] bits */ + defective_sector : 1, /* DS */ + mbz1 : 1, /* 0 */ + head : 4; /* head number */ - uint8_t cyl_low; /* cylinder [7:0] bits */ + uint8_t cyl_low; /* cylinder [7:0] bits */ - uint8_t sector; /* sector number */ + uint8_t sector; /* sector number */ - uint8_t mbz2 : 1, /* 0 */ - mbo : 1, /* 1 */ - mbz3 : 6; /* 000000 */ + uint8_t mbz2 : 1, /* 0 */ + mbo : 1, /* 1 */ + mbz3 : 6; /* 000000 */ - uint8_t fill; /* filler byte */ + uint8_t fill; /* filler byte */ } fcb_t; #pragma pack(pop) @@ -319,25 +319,25 @@ typedef struct { */ #pragma pack(push, 1) typedef struct { - uint8_t ec_p : 1, /* EC/P (ecc/park) */ - mbz1 : 1, /* 0 */ - auto_seek : 1, /* AS (auto-seek) */ - no_data : 1, /* ND (no data) */ - cmd : 4; /* command code[4] */ + uint8_t ec_p : 1, /* EC/P (ecc/park) */ + mbz1 : 1, /* 0 */ + auto_seek : 1, /* AS (auto-seek) */ + no_data : 1, /* ND (no data) */ + cmd : 4; /* command code[4] */ - uint8_t cyl_high : 2, /* cylinder [9:8] bits */ - mbz2 : 2, /* 00 */ - head : 4; /* head number */ + uint8_t cyl_high : 2, /* cylinder [9:8] bits */ + mbz2 : 2, /* 00 */ + head : 4; /* head number */ - uint8_t cyl_low; /* cylinder [7:0] bits */ + uint8_t cyl_low; /* cylinder [7:0] bits */ - uint8_t sector; /* sector number */ + uint8_t sector; /* sector number */ - uint8_t mbz3 : 1, /* 0 */ - mbo1 : 1, /* 1 */ - mbz4 : 6; /* 000000 */ + uint8_t mbz3 : 1, /* 0 */ + mbo1 : 1, /* 1 */ + mbz4 : 6; /* 000000 */ - uint8_t count; /* blk count/interleave */ + uint8_t count; /* blk count/interleave */ } ccb_t; #pragma pack(pop) @@ -417,51 +417,51 @@ typedef struct { */ static const geom_t ibm_type_table[] = { // clang-format off - { 0, 0, 0, 0, 0 }, /* 0 (none) */ - { 306, 4, 17, 128, 305 }, /* 1 10 MB */ - { 615, 4, 17, 300, 615 }, /* 2 20 MB */ - { 615, 6, 17, 300, 615 }, /* 3 31 MB */ - { 940, 8, 17, 512, 940 }, /* 4 62 MB */ - { 940, 6, 17, 512, 940 }, /* 5 47 MB */ - { 615, 4, 17, -1, 615 }, /* 6 20 MB */ - { 462, 8, 17, 256, 511 }, /* 7 31 MB */ - { 733, 5, 17, -1, 733 }, /* 8 30 MB */ - { 900, 15, 17, -1, 901 }, /* 9 112 MB */ - { 820, 3, 17, -1, 820 }, /* 10 20 MB */ - { 855, 5, 17, -1, 855 }, /* 11 35 MB */ - { 855, 7, 17, -1, 855 }, /* 12 50 MB */ - { 306, 8, 17, 128, 319 }, /* 13 20 MB */ - { 733, 7, 17, -1, 733 }, /* 14 43 MB */ - { 0, 0, 0, 0, 0 }, /* 15 (rsvd) */ - { 612, 4, 17, 0, 663 }, /* 16 20 MB */ - { 977, 5, 17, 300, 977 }, /* 17 41 MB */ - { 977, 7, 17, -1, 977 }, /* 18 57 MB */ - { 1024, 7, 17, 512, 1023 }, /* 19 59 MB */ - { 733, 5, 17, 300, 732 }, /* 20 30 MB */ - { 733, 7, 17, 300, 732 }, /* 21 43 MB */ - { 733, 5, 17, 300, 733 }, /* 22 30 MB */ - { 306, 4, 17, 0, 336 }, /* 23 10 MB */ - { 612, 4, 17, 305, 663 }, /* 24 20 MB */ - { 306, 4, 17, -1, 340 }, /* 25 10 MB */ - { 612, 4, 17, -1, 670 }, /* 26 20 MB */ - { 698, 7, 17, 300, 732 }, /* 27 41 MB */ - { 976, 5, 17, 488, 977 }, /* 28 40 MB */ - { 306, 4, 17, 0, 340 }, /* 29 10 MB */ - { 611, 4, 17, 306, 663 }, /* 30 20 MB */ - { 732, 7, 17, 300, 732 }, /* 31 43 MB */ - { 1023, 5, 17, -1, 1023 }, /* 32 42 MB */ - { 614, 4, 25, -1, 663 }, /* 33 30 MB */ - { 775, 2, 27, -1, 900 }, /* 34 20 MB */ - { 921, 2, 33, -1, 1000 }, /* 35 30 MB * */ - { 402, 4, 26, -1, 460 }, /* 36 20 MB */ - { 580, 6, 26, -1, 640 }, /* 37 44 MB */ - { 845, 2, 36, -1, 1023 }, /* 38 30 MB * */ - { 769, 3, 36, -1, 1023 }, /* 39 41 MB * */ - { 531, 4, 39, -1, 532 }, /* 40 40 MB */ - { 577, 2, 36, -1, 1023 }, /* 41 20 MB */ - { 654, 2, 32, -1, 674 }, /* 42 20 MB */ - { 923, 5, 36, -1, 1023 }, /* 43 81 MB */ - { 531, 8, 39, -1, 532 } /* 44 81 MB */ + { 0, 0, 0, 0, 0 }, /* 0 (none) */ + { 306, 4, 17, 128, 305 }, /* 1 10 MB */ + { 615, 4, 17, 300, 615 }, /* 2 20 MB */ + { 615, 6, 17, 300, 615 }, /* 3 31 MB */ + { 940, 8, 17, 512, 940 }, /* 4 62 MB */ + { 940, 6, 17, 512, 940 }, /* 5 47 MB */ + { 615, 4, 17, -1, 615 }, /* 6 20 MB */ + { 462, 8, 17, 256, 511 }, /* 7 31 MB */ + { 733, 5, 17, -1, 733 }, /* 8 30 MB */ + { 900, 15, 17, -1, 901 }, /* 9 112 MB */ + { 820, 3, 17, -1, 820 }, /* 10 20 MB */ + { 855, 5, 17, -1, 855 }, /* 11 35 MB */ + { 855, 7, 17, -1, 855 }, /* 12 50 MB */ + { 306, 8, 17, 128, 319 }, /* 13 20 MB */ + { 733, 7, 17, -1, 733 }, /* 14 43 MB */ + { 0, 0, 0, 0, 0 }, /* 15 (rsvd) */ + { 612, 4, 17, 0, 663 }, /* 16 20 MB */ + { 977, 5, 17, 300, 977 }, /* 17 41 MB */ + { 977, 7, 17, -1, 977 }, /* 18 57 MB */ + { 1024, 7, 17, 512, 1023 }, /* 19 59 MB */ + { 733, 5, 17, 300, 732 }, /* 20 30 MB */ + { 733, 7, 17, 300, 732 }, /* 21 43 MB */ + { 733, 5, 17, 300, 733 }, /* 22 30 MB */ + { 306, 4, 17, 0, 336 }, /* 23 10 MB */ + { 612, 4, 17, 305, 663 }, /* 24 20 MB */ + { 306, 4, 17, -1, 340 }, /* 25 10 MB */ + { 612, 4, 17, -1, 670 }, /* 26 20 MB */ + { 698, 7, 17, 300, 732 }, /* 27 41 MB */ + { 976, 5, 17, 488, 977 }, /* 28 40 MB */ + { 306, 4, 17, 0, 340 }, /* 29 10 MB */ + { 611, 4, 17, 306, 663 }, /* 30 20 MB */ + { 732, 7, 17, 300, 732 }, /* 31 43 MB */ + { 1023, 5, 17, -1, 1023 }, /* 32 42 MB */ + { 614, 4, 25, -1, 663 }, /* 33 30 MB */ + { 775, 2, 27, -1, 900 }, /* 34 20 MB */ + { 921, 2, 33, -1, 1000 }, /* 35 30 MB * */ + { 402, 4, 26, -1, 460 }, /* 36 20 MB */ + { 580, 6, 26, -1, 640 }, /* 37 44 MB */ + { 845, 2, 36, -1, 1023 }, /* 38 30 MB * */ + { 769, 3, 36, -1, 1023 }, /* 39 41 MB * */ + { 531, 4, 39, -1, 532 }, /* 40 40 MB */ + { 577, 2, 36, -1, 1023 }, /* 41 20 MB */ + { 654, 2, 32, -1, 674 }, /* 42 20 MB */ + { 923, 5, 36, -1, 1023 }, /* 43 81 MB */ + { 531, 8, 39, -1, 532 } /* 44 81 MB */ // clang-format on }; @@ -663,7 +663,7 @@ do_format(hdc_t *dev, drive_t *drive, ccb_t *ccb) /* Point to the FCB we got. */ #if 0 - fcb = (fcb_t *)dev->data; + fcb = (fcb_t *)dev->data; #endif dev->state = STATE_FINIT; /*FALLTHROUGH*/ @@ -693,7 +693,7 @@ do_fmt: * use it's "filler byte" value... */ #if 0 - hdd_image_zero_ex(drive->hdd_num, addr, fcb->fill, drive->spt); + hdd_image_zero_ex(drive->hdd_num, addr, fcb->fill, drive->spt); #else hdd_image_zero(drive->hdd_num, addr, drive->spt); #endif diff --git a/src/machine/m_ps2_mca.c b/src/machine/m_ps2_mca.c index 37077ac89..4a3139a03 100644 --- a/src/machine/m_ps2_mca.c +++ b/src/machine/m_ps2_mca.c @@ -1,22 +1,22 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of MCA-based PS/2 machines. + * Implementation of MCA-based PS/2 machines. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2017-2019 Fred N. van Kempen. - * Copyright 2016-2019 Miran Grca. - * Copyright 2008-2019 Sarah Walker. + * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2016-2019 Miran Grca. + * Copyright 2008-2019 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/machine/m_xt_t1000.c b/src/machine/m_xt_t1000.c index 5e08115d4..7e55766df 100644 --- a/src/machine/m_xt_t1000.c +++ b/src/machine/m_xt_t1000.c @@ -1,65 +1,65 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the Toshiba T1000 and T1200 portables. + * Implementation of the Toshiba T1000 and T1200 portables. * - * The T1000 is the T3100e's little brother -- a real laptop - * with a rechargeable battery. + * The T1000 is the T3100e's little brother -- a real laptop + * with a rechargeable battery. * - * Features: 80C88 at 4.77MHz - * - 512k system RAM - * - 640x200 monochrome LCD - * - 82-key keyboard - * - Real-time clock. Not the normal 146818, but a TC8521, - * which is a 4-bit chip. - * - A ROM drive (128k, 256k or 512k) which acts as a mini - * hard drive and contains a copy of DOS 2.11. - * - 160 bytes of non-volatile RAM for the CONFIG.SYS used - * when booting from the ROM drive. Possibly physically - * located in the keyboard controller RAM. + * Features: 80C88 at 4.77MHz + * - 512k system RAM + * - 640x200 monochrome LCD + * - 82-key keyboard + * - Real-time clock. Not the normal 146818, but a TC8521, + * which is a 4-bit chip. + * - A ROM drive (128k, 256k or 512k) which acts as a mini + * hard drive and contains a copy of DOS 2.11. + * - 160 bytes of non-volatile RAM for the CONFIG.SYS used + * when booting from the ROM drive. Possibly physically + * located in the keyboard controller RAM. * - * An optional memory expansion board can be fitted. This adds - * 768k of RAM, which can be used for up to three purposes: - * > Conventional memory -- 128k between 512k and 640k - * > HardRAM -- a battery-backed RAM drive. - * > EMS + * An optional memory expansion board can be fitted. This adds + * 768k of RAM, which can be used for up to three purposes: + * > Conventional memory -- 128k between 512k and 640k + * > HardRAM -- a battery-backed RAM drive. + * > EMS * - * This means that there are up to three different - * implementations of non-volatile RAM in the same computer - * (52 nibbles in the TC8521, 160 bytes of CONFIG.SYS, and - * up to 768k of HardRAM). + * This means that there are up to three different + * implementations of non-volatile RAM in the same computer + * (52 nibbles in the TC8521, 160 bytes of CONFIG.SYS, and + * up to 768k of HardRAM). * - * The T1200 is a slightly upgraded version with a turbo mode - * (double CPU clock, 9.54MHz) and an optional hard drive. - * The interface for this is proprietary both at the physical - * and programming level. + * The T1200 is a slightly upgraded version with a turbo mode + * (double CPU clock, 9.54MHz) and an optional hard drive. + * The interface for this is proprietary both at the physical + * and programming level. * - * 01F2h: If hard drive is present, low 4 bits are 0Ch [20Mb] - * or 0Dh [10Mb]. + * 01F2h: If hard drive is present, low 4 bits are 0Ch [20Mb] + * or 0Dh [10Mb]. * - * The hard drive is a 20MB (615/2/26) RLL 3.5" drive. + * The hard drive is a 20MB (615/2/26) RLL 3.5" drive. * - * The TC8521 is a 4-bit RTC, so each memory location can only - * hold a single BCD digit. Hence everything has 'ones' and - * 'tens' digits. + * The TC8521 is a 4-bit RTC, so each memory location can only + * hold a single BCD digit. Hence everything has 'ones' and + * 'tens' digits. * - * NOTE: Still need to figure out a way to load/save ConfigSys and - * HardRAM stuff. Needs to be linked in to the NVR code. + * NOTE: Still need to figure out a way to load/save ConfigSys and + * HardRAM stuff. Needs to be linked in to the NVR code. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2018,2019 Fred N. van Kempen. - * Copyright 2018,2019 Miran Grca. - * Copyright 2018,2019 Sarah Walker. + * Copyright 2018,2019 Fred N. van Kempen. + * Copyright 2018,2019 Miran Grca. + * Copyright 2018,2019 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/machine/m_xt_t1000_vid.c b/src/machine/m_xt_t1000_vid.c index 309ec132e..cdd20cae1 100644 --- a/src/machine/m_xt_t1000_vid.c +++ b/src/machine/m_xt_t1000_vid.c @@ -1,23 +1,23 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the Toshiba T1000 plasma display, which - * has a fixed resolution of 640x200 pixels. + * Implementation of the Toshiba T1000 plasma display, which + * has a fixed resolution of 640x200 pixels. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Sarah Walker, * - * Copyright 2018,2019 Fred N. van Kempen. - * Copyright 2018,2019 Miran Grca. - * Copyright 2018,2019 Sarah Walker. + * Copyright 2018,2019 Fred N. van Kempen. + * Copyright 2018,2019 Miran Grca. + * Copyright 2018,2019 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -546,9 +546,9 @@ t1000_recalcattrs(t1000_t *t1000) * Bit 0: Attributes 01-06, 08-0E are inverse video * Bit 1: Attributes 01-06, 08-0E are bold * Bit 2: Attributes 11-16, 18-1F, 21-26, 28-2F ... F1-F6, F8-FF - * are inverse video + * are inverse video * Bit 3: Attributes 11-16, 18-1F, 21-26, 28-2F ... F1-F6, F8-FF - * are bold */ + * are bold */ /* Set up colours */ if (t1000->invert) { diff --git a/src/network/net_ne2000.c b/src/network/net_ne2000.c index 501c52f3c..66681206b 100644 --- a/src/network/net_ne2000.c +++ b/src/network/net_ne2000.c @@ -1,30 +1,30 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the following network controllers: - * - Novell NE1000 (ISA 8-bit); - * - Novell NE2000 (ISA 16-bit); - * - Novell NE/2 compatible (NetWorth Inc. Ethernext/MC) (MCA 16-bit); - * - Realtek RTL8019AS (ISA 16-bit, PnP); - * - Realtek RTL8029AS (PCI). + * Implementation of the following network controllers: + * - Novell NE1000 (ISA 8-bit); + * - Novell NE2000 (ISA 16-bit); + * - Novell NE/2 compatible (NetWorth Inc. Ethernext/MC) (MCA 16-bit); + * - Realtek RTL8019AS (ISA 16-bit, PnP); + * - Realtek RTL8029AS (PCI). * * * - * Based on @(#)ne2k.cc v1.56.2.1 2004/02/02 22:37:22 cbothamy + * Based on @(#)ne2k.cc v1.56.2.1 2004/02/02 22:37:22 cbothamy * - * Authors: Fred N. van Kempen, - * TheCollector1995, - * Miran Grca, - * Peter Grehan, + * Authors: Fred N. van Kempen, + * TheCollector1995, + * Miran Grca, + * Peter Grehan, * - * Copyright 2017,2018 Fred N. van Kempen. - * Copyright 2016-2018 Miran Grca. - * Portions Copyright (C) 2002 MandrakeSoft S.A. + * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2016-2018 Miran Grca. + * Portions Copyright (C) 2002 MandrakeSoft S.A. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index 69dc2ca14..31fba2f52 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Handle WinPcap library processing. + * Handle WinPcap library processing. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2017-2019 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/network/network.c b/src/network/network.c index a2783c158..570f8e039 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -1,40 +1,40 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the network module. + * Implementation of the network module. * - * NOTE The definition of the netcard_t is currently not optimal; - * it should be malloc'ed and then linked to the NETCARD def. - * Will be done later. + * NOTE The definition of the netcard_t is currently not optimal; + * it should be malloc'ed and then linked to the NETCARD def. + * Will be done later. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2017-2019 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/network/pcap_if.c b/src/network/pcap_if.c index c38803462..cca012cff 100644 --- a/src/network/pcap_if.c +++ b/src/network/pcap_if.c @@ -1,38 +1,38 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Simple program to show usage of (Win)Pcap. + * Simple program to show usage of (Win)Pcap. * - * Based on the "libpcap" examples. + * Based on the "libpcap" examples. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2017,2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/nvr.c b/src/nvr.c index eb5a1e49d..5d6a272ff 100644 --- a/src/nvr.c +++ b/src/nvr.c @@ -1,38 +1,38 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implement a generic NVRAM/CMOS/RTC device. + * Implement a generic NVRAM/CMOS/RTC device. * * * - * Authors: Fred N. van Kempen, , - * David Hrdlička, + * Authors: Fred N. van Kempen, , + * David Hrdlička, * - * Copyright 2017-2019 Fred N. van Kempen. - * Copyright 2018,2019 David Hrdlička. + * Copyright 2017-2019 Fred N. van Kempen. + * Copyright 2018,2019 David Hrdlička. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/nvr_at.c b/src/nvr_at.c index 29b9b57ba..d05508e5f 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -1,204 +1,204 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implement a more-or-less defacto-standard RTC/NVRAM. + * Implement a more-or-less defacto-standard RTC/NVRAM. * - * When IBM released the PC/AT machine, it came standard with a - * battery-backed RTC chip to keep the time of day, something - * that was optional on standard PC's with a myriad variants - * being put on the market, often on cheap multi-I/O cards. + * When IBM released the PC/AT machine, it came standard with a + * battery-backed RTC chip to keep the time of day, something + * that was optional on standard PC's with a myriad variants + * being put on the market, often on cheap multi-I/O cards. * - * The PC/AT had an on-board DS12885-series chip ("the black - * block") which was an RTC/clock chip with onboard oscillator - * and a backup battery (hence the big size.) The chip also had - * a small amount of RAM bytes available to the user, which was - * used by IBM's ROM BIOS to store machine configuration data. - * Later versions and clones used the 12886 and/or 1288(C)7 - * series, or the MC146818 series, all with an external battery. - * Many of those batteries would create corrosion issues later - * on in mainboard life... + * The PC/AT had an on-board DS12885-series chip ("the black + * block") which was an RTC/clock chip with onboard oscillator + * and a backup battery (hence the big size.) The chip also had + * a small amount of RAM bytes available to the user, which was + * used by IBM's ROM BIOS to store machine configuration data. + * Later versions and clones used the 12886 and/or 1288(C)7 + * series, or the MC146818 series, all with an external battery. + * Many of those batteries would create corrosion issues later + * on in mainboard life... * - * Since then, pretty much any PC has an implementation of that - * device, which became known as the "nvr" or "cmos". + * Since then, pretty much any PC has an implementation of that + * device, which became known as the "nvr" or "cmos". * - * NOTES Info extracted from the data sheets: + * NOTES Info extracted from the data sheets: * - * * The century register at location 32h is a BCD register - * designed to automatically load the BCD value 20 as the - * year register changes from 99 to 00. The MSB of this - * register is not affected when the load of 20 occurs, - * and remains at the value written by the user. + * * The century register at location 32h is a BCD register + * designed to automatically load the BCD value 20 as the + * year register changes from 99 to 00. The MSB of this + * register is not affected when the load of 20 occurs, + * and remains at the value written by the user. * - * * Rate Selector (RS3:RS0) - * These four rate-selection bits select one of the 13 - * taps on the 15-stage divider or disable the divider - * output. The tap selected can be used to generate an - * output square wave (SQW pin) and/or a periodic interrupt. + * * Rate Selector (RS3:RS0) + * These four rate-selection bits select one of the 13 + * taps on the 15-stage divider or disable the divider + * output. The tap selected can be used to generate an + * output square wave (SQW pin) and/or a periodic interrupt. * - * The user can do one of the following: - * - enable the interrupt with the PIE bit; - * - enable the SQW output pin with the SQWE bit; - * - enable both at the same time and the same rate; or - * - enable neither. + * The user can do one of the following: + * - enable the interrupt with the PIE bit; + * - enable the SQW output pin with the SQWE bit; + * - enable both at the same time and the same rate; or + * - enable neither. * - * Table 3 lists the periodic interrupt rates and the square - * wave frequencies that can be chosen with the RS bits. - * These four read/write bits are not affected by !RESET. + * Table 3 lists the periodic interrupt rates and the square + * wave frequencies that can be chosen with the RS bits. + * These four read/write bits are not affected by !RESET. * - * * Oscillator (DV2:DV0) - * These three bits are used to turn the oscillator on or - * off and to reset the countdown chain. A pattern of 010 - * is the only combination of bits that turn the oscillator - * on and allow the RTC to keep time. A pattern of 11x - * enables the oscillator but holds the countdown chain in - * reset. The next update occurs at 500ms after a pattern - * of 010 is written to DV0, DV1, and DV2. + * * Oscillator (DV2:DV0) + * These three bits are used to turn the oscillator on or + * off and to reset the countdown chain. A pattern of 010 + * is the only combination of bits that turn the oscillator + * on and allow the RTC to keep time. A pattern of 11x + * enables the oscillator but holds the countdown chain in + * reset. The next update occurs at 500ms after a pattern + * of 010 is written to DV0, DV1, and DV2. * - * * Update-In-Progress (UIP) - * This bit is a status flag that can be monitored. When the - * UIP bit is a 1, the update transfer occurs soon. When - * UIP is a 0, the update transfer does not occur for at - * least 244us. The time, calendar, and alarm information - * in RAM is fully available for access when the UIP bit - * is 0. The UIP bit is read-only and is not affected by - * !RESET. Writing the SET bit in Register B to a 1 - * inhibits any update transfer and clears the UIP status bit. + * * Update-In-Progress (UIP) + * This bit is a status flag that can be monitored. When the + * UIP bit is a 1, the update transfer occurs soon. When + * UIP is a 0, the update transfer does not occur for at + * least 244us. The time, calendar, and alarm information + * in RAM is fully available for access when the UIP bit + * is 0. The UIP bit is read-only and is not affected by + * !RESET. Writing the SET bit in Register B to a 1 + * inhibits any update transfer and clears the UIP status bit. * - * * Daylight Saving Enable (DSE) - * This bit is a read/write bit that enables two daylight - * saving adjustments when DSE is set to 1. On the first - * Sunday in April (or the last Sunday in April in the - * MC146818A), the time increments from 1:59:59 AM to - * 3:00:00 AM. On the last Sunday in October when the time - * first reaches 1:59:59 AM, it changes to 1:00:00 AM. + * * Daylight Saving Enable (DSE) + * This bit is a read/write bit that enables two daylight + * saving adjustments when DSE is set to 1. On the first + * Sunday in April (or the last Sunday in April in the + * MC146818A), the time increments from 1:59:59 AM to + * 3:00:00 AM. On the last Sunday in October when the time + * first reaches 1:59:59 AM, it changes to 1:00:00 AM. * - * When DSE is enabled, the internal logic test for the - * first/last Sunday condition at midnight. If the DSE bit - * is not set when the test occurs, the daylight saving - * function does not operate correctly. These adjustments - * do not occur when the DSE bit is 0. This bit is not - * affected by internal functions or !RESET. + * When DSE is enabled, the internal logic test for the + * first/last Sunday condition at midnight. If the DSE bit + * is not set when the test occurs, the daylight saving + * function does not operate correctly. These adjustments + * do not occur when the DSE bit is 0. This bit is not + * affected by internal functions or !RESET. * - * * 24/12 - * The 24/12 control bit establishes the format of the hours - * byte. A 1 indicates the 24-hour mode and a 0 indicates - * the 12-hour mode. This bit is read/write and is not - * affected by internal functions or !RESET. + * * 24/12 + * The 24/12 control bit establishes the format of the hours + * byte. A 1 indicates the 24-hour mode and a 0 indicates + * the 12-hour mode. This bit is read/write and is not + * affected by internal functions or !RESET. * - * * Data Mode (DM) - * This bit indicates whether time and calendar information - * is in binary or BCD format. The DM bit is set by the - * program to the appropriate format and can be read as - * required. This bit is not modified by internal functions - * or !RESET. A 1 in DM signifies binary data, while a 0 in - * DM specifies BCD data. + * * Data Mode (DM) + * This bit indicates whether time and calendar information + * is in binary or BCD format. The DM bit is set by the + * program to the appropriate format and can be read as + * required. This bit is not modified by internal functions + * or !RESET. A 1 in DM signifies binary data, while a 0 in + * DM specifies BCD data. * - * * Square-Wave Enable (SQWE) - * When this bit is set to 1, a square-wave signal at the - * frequency set by the rate-selection bits RS3-RS0 is driven - * out on the SQW pin. When the SQWE bit is set to 0, the - * SQW pin is held low. SQWE is a read/write bit and is - * cleared by !RESET. SQWE is low if disabled, and is high - * impedance when VCC is below VPF. SQWE is cleared to 0 on - * !RESET. + * * Square-Wave Enable (SQWE) + * When this bit is set to 1, a square-wave signal at the + * frequency set by the rate-selection bits RS3-RS0 is driven + * out on the SQW pin. When the SQWE bit is set to 0, the + * SQW pin is held low. SQWE is a read/write bit and is + * cleared by !RESET. SQWE is low if disabled, and is high + * impedance when VCC is below VPF. SQWE is cleared to 0 on + * !RESET. * - * * Update-Ended Interrupt Enable (UIE) - * This bit is a read/write bit that enables the update-end - * flag (UF) bit in Register C to assert !IRQ. The !RESET - * pin going low or the SET bit going high clears the UIE bit. - * The internal functions of the device do not affect the UIE - * bit, but is cleared to 0 on !RESET. + * * Update-Ended Interrupt Enable (UIE) + * This bit is a read/write bit that enables the update-end + * flag (UF) bit in Register C to assert !IRQ. The !RESET + * pin going low or the SET bit going high clears the UIE bit. + * The internal functions of the device do not affect the UIE + * bit, but is cleared to 0 on !RESET. * - * * Alarm Interrupt Enable (AIE) - * This bit is a read/write bit that, when set to 1, permits - * the alarm flag (AF) bit in Register C to assert !IRQ. An - * alarm interrupt occurs for each second that the three time - * bytes equal the three alarm bytes, including a don't-care - * alarm code of binary 11XXXXXX. The AF bit does not - * initiate the !IRQ signal when the AIE bit is set to 0. - * The internal functions of the device do not affect the AIE - * bit, but is cleared to 0 on !RESET. + * * Alarm Interrupt Enable (AIE) + * This bit is a read/write bit that, when set to 1, permits + * the alarm flag (AF) bit in Register C to assert !IRQ. An + * alarm interrupt occurs for each second that the three time + * bytes equal the three alarm bytes, including a don't-care + * alarm code of binary 11XXXXXX. The AF bit does not + * initiate the !IRQ signal when the AIE bit is set to 0. + * The internal functions of the device do not affect the AIE + * bit, but is cleared to 0 on !RESET. * - * * Periodic Interrupt Enable (PIE) - * The PIE bit is a read/write bit that allows the periodic - * interrupt flag (PF) bit in Register C to drive the !IRQ pin - * low. When the PIE bit is set to 1, periodic interrupts are - * generated by driving the !IRQ pin low at a rate specified - * by the RS3-RS0 bits of Register A. A 0 in the PIE bit - * blocks the !IRQ output from being driven by a periodic - * interrupt, but the PF bit is still set at the periodic - * rate. PIE is not modified b any internal device functions, - * but is cleared to 0 on !RESET. + * * Periodic Interrupt Enable (PIE) + * The PIE bit is a read/write bit that allows the periodic + * interrupt flag (PF) bit in Register C to drive the !IRQ pin + * low. When the PIE bit is set to 1, periodic interrupts are + * generated by driving the !IRQ pin low at a rate specified + * by the RS3-RS0 bits of Register A. A 0 in the PIE bit + * blocks the !IRQ output from being driven by a periodic + * interrupt, but the PF bit is still set at the periodic + * rate. PIE is not modified b any internal device functions, + * but is cleared to 0 on !RESET. * - * * SET - * When the SET bit is 0, the update transfer functions - * normally by advancing the counts once per second. When - * the SET bit is written to 1, any update transfer is - * inhibited, and the program can initialize the time and - * calendar bytes without an update occurring in the midst of - * initializing. Read cycles can be executed in a similar - * manner. SET is a read/write bit and is not affected by - * !RESET or internal functions of the device. + * * SET + * When the SET bit is 0, the update transfer functions + * normally by advancing the counts once per second. When + * the SET bit is written to 1, any update transfer is + * inhibited, and the program can initialize the time and + * calendar bytes without an update occurring in the midst of + * initializing. Read cycles can be executed in a similar + * manner. SET is a read/write bit and is not affected by + * !RESET or internal functions of the device. * - * * Update-Ended Interrupt Flag (UF) - * This bit is set after each update cycle. When the UIE - * bit is set to 1, the 1 in UF causes the IRQF bit to be - * a 1, which asserts the !IRQ pin. This bit can be - * cleared by reading Register C or with a !RESET. + * * Update-Ended Interrupt Flag (UF) + * This bit is set after each update cycle. When the UIE + * bit is set to 1, the 1 in UF causes the IRQF bit to be + * a 1, which asserts the !IRQ pin. This bit can be + * cleared by reading Register C or with a !RESET. * - * * Alarm Interrupt Flag (AF) - * A 1 in the AF bit indicates that the current time has - * matched the alarm time. If the AIE bit is also 1, the - * !IRQ pin goes low and a 1 appears in the IRQF bit. This - * bit can be cleared by reading Register C or with a - * !RESET. + * * Alarm Interrupt Flag (AF) + * A 1 in the AF bit indicates that the current time has + * matched the alarm time. If the AIE bit is also 1, the + * !IRQ pin goes low and a 1 appears in the IRQF bit. This + * bit can be cleared by reading Register C or with a + * !RESET. * - * * Periodic Interrupt Flag (PF) - * This bit is read-only and is set to 1 when an edge is - * detected on the selected tap of the divider chain. The - * RS3 through RS0 bits establish the periodic rate. PF is - * set to 1 independent of the state of the PIE bit. When - * both PF and PIE are 1s, the !IRQ signal is active and - * sets the IRQF bit. This bit can be cleared by reading - * Register C or with a !RESET. + * * Periodic Interrupt Flag (PF) + * This bit is read-only and is set to 1 when an edge is + * detected on the selected tap of the divider chain. The + * RS3 through RS0 bits establish the periodic rate. PF is + * set to 1 independent of the state of the PIE bit. When + * both PF and PIE are 1s, the !IRQ signal is active and + * sets the IRQF bit. This bit can be cleared by reading + * Register C or with a !RESET. * - * * Interrupt Request Flag (IRQF) - * The interrupt request flag (IRQF) is set to a 1 when one - * or more of the following are true: - * - PF == PIE == 1 - * - AF == AIE == 1 - * - UF == UIE == 1 - * Any time the IRQF bit is a 1, the !IRQ pin is driven low. - * All flag bits are cleared after Register C is read by the - * program or when the !RESET pin is low. + * * Interrupt Request Flag (IRQF) + * The interrupt request flag (IRQF) is set to a 1 when one + * or more of the following are true: + * - PF == PIE == 1 + * - AF == AIE == 1 + * - UF == UIE == 1 + * Any time the IRQF bit is a 1, the !IRQ pin is driven low. + * All flag bits are cleared after Register C is read by the + * program or when the !RESET pin is low. * - * * Valid RAM and Time (VRT) - * This bit indicates the condition of the battery connected - * to the VBAT pin. This bit is not writeable and should - * always be 1 when read. If a 0 is ever present, an - * exhausted internal lithium energy source is indicated and - * both the contents of the RTC data and RAM data are - * questionable. This bit is unaffected by !RESET. + * * Valid RAM and Time (VRT) + * This bit indicates the condition of the battery connected + * to the VBAT pin. This bit is not writeable and should + * always be 1 when read. If a 0 is ever present, an + * exhausted internal lithium energy source is indicated and + * both the contents of the RTC data and RAM data are + * questionable. This bit is unaffected by !RESET. * - * This file implements a generic version of the RTC/NVRAM chip, - * including the later update (DS12887A) which implemented a - * "century" register to be compatible with Y2K. + * This file implements a generic version of the RTC/NVRAM chip, + * including the later update (DS12887A) which implemented a + * "century" register to be compatible with Y2K. * * * - * Authors: Fred N. van Kempen, - * Miran Grca, - * Mahod, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Miran Grca, + * Mahod, + * Sarah Walker, * - * Copyright 2017-2020 Fred N. van Kempen. - * Copyright 2016-2020 Miran Grca. - * Copyright 2008-2020 Sarah Walker. + * Copyright 2017-2020 Fred N. van Kempen. + * Copyright 2016-2020 Miran Grca. + * Copyright 2008-2020 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/nvr_ps2.c b/src/nvr_ps2.c index 6b6b69cc8..47c8e86c0 100644 --- a/src/nvr_ps2.c +++ b/src/nvr_ps2.c @@ -1,20 +1,20 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Handling of the PS/2 series CMOS devices. + * Handling of the PS/2 series CMOS devices. * * * - * Authors: Fred N. van Kempen, - * Sarah Walker, + * Authors: Fred N. van Kempen, + * Sarah Walker, * - * Copyright 2017,2018 Fred N. van Kempen. - * Copyright 2008-2018 Sarah Walker. + * Copyright 2017,2018 Fred N. van Kempen. + * Copyright 2008-2018 Sarah Walker. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/printer/png.c b/src/printer/png.c index 8c0be60e1..991e3c475 100644 --- a/src/printer/png.c +++ b/src/printer/png.c @@ -1,36 +1,36 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Provide centralized access to the PNG image handler. + * Provide centralized access to the PNG image handler. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2018 Fred N. van Kempen. + * Copyright 2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/printer/prt_cpmap.c b/src/printer/prt_cpmap.c index 56a8b8f9a..32eebcfdd 100644 --- a/src/printer/prt_cpmap.c +++ b/src/printer/prt_cpmap.c @@ -1,40 +1,40 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Various ASCII to Unicode maps, for the various codepages. + * Various ASCII to Unicode maps, for the various codepages. * * * - * Authors: Michael Drüing, - * Fred N. van Kempen, + * Authors: Michael Drüing, + * Fred N. van Kempen, * - * Based on code by Frederic Weymann (originally for DosBox.) + * Based on code by Frederic Weymann (originally for DosBox.) * - * Copyright 2018 Michael Drüing. - * Copyright 2018 Fred N. van Kempen. + * Copyright 2018 Michael Drüing. + * Copyright 2018 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT diff --git a/src/printer/prt_escp.c b/src/printer/prt_escp.c index 45b457578..5c74431b7 100644 --- a/src/printer/prt_escp.c +++ b/src/printer/prt_escp.c @@ -1,40 +1,40 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of the Generic ESC/P Dot-Matrix printer. + * Implementation of the Generic ESC/P Dot-Matrix printer. * * * - * Authors: Michael Drüing, - * Fred N. van Kempen, + * Authors: Michael Drüing, + * Fred N. van Kempen, * - * Based on code by Frederic Weymann (originally for DosBox.) + * Based on code by Frederic Weymann (originally for DosBox.) * - * Copyright 2018,2019 Michael Drüing. - * Copyright 2019,2019 Fred N. van Kempen. + * Copyright 2018,2019 Michael Drüing. + * Copyright 2019,2019 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT @@ -697,8 +697,8 @@ process_char(escp_t *dev, uint8_t ch) case 0x5e: // Enable printing of all character codes on next character case 0x67: // Select 10.5-point, 15-cpi (ESC g) - case 0x834: // Select italic font (FS 4) (= ESC 4) - case 0x835: // Cancel italic font (FS 5) (= ESC 5) + case 0x834: // Select italic font (FS 4) (= ESC 4) + case 0x835: // Cancel italic font (FS 5) (= ESC 5) case 0x846: // Select forward feed mode (FS F) case 0x852: // Select reverse feed mode (FS R) dev->esc_parms_req = 0; @@ -735,14 +735,14 @@ process_char(escp_t *dev, uint8_t ch) case 0x77: // Turn double-height printing on/off (ESC w) case 0x78: // Select LQ or draft (ESC x) case 0x7e: // Select/Deselect slash zero (ESC ~) - case 0x832: // Select 1/6-inch line spacing (FS 2) (= ESC 2) - case 0x833: // Set n/360-inch line spacing (FS 3) (= ESC +) - case 0x841: // Set n/60-inch line spacing (FS A) (= ESC A) - case 0x843: // Select LQ type style (FS C) (= ESC k) + case 0x832: // Select 1/6-inch line spacing (FS 2) (= ESC 2) + case 0x833: // Set n/360-inch line spacing (FS 3) (= ESC +) + case 0x841: // Set n/60-inch line spacing (FS A) (= ESC A) + case 0x843: // Select LQ type style (FS C) (= ESC k) case 0x845: // Select character width (FS E) - case 0x849: // Select character table (FS I) (= ESC t) + case 0x849: // Select character table (FS I) (= ESC t) case 0x853: // Select High Speed/High Density elite pitch (FS S) - case 0x856: // Turn double-height printing on/off (FS V) (= ESC w) + case 0x856: // Turn double-height printing on/off (FS V) (= ESC w) dev->esc_parms_req = 1; break; diff --git a/src/printer/prt_text.c b/src/printer/prt_text.c index a9c170fa6..6bf25ac06 100644 --- a/src/printer/prt_text.c +++ b/src/printer/prt_text.c @@ -1,43 +1,43 @@ /* - * VARCem Virtual ARchaeological Computer EMulator. - * An emulator of (mostly) x86-based PC systems and devices, - * using the ISA,EISA,VLB,MCA and PCI system buses, roughly - * spanning the era between 1981 and 1995. + * 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 + * system designs based on the PCI bus. * - * This file is part of the VARCem Project. + * This file is part of the 86Box distribution. * - * Implementation of a generic text printer. + * Implementation of a generic text printer. * - * Simple old text printers were unable to do any formatting - * of the text. They were just sheets of paper with a fixed - * size (in the U.S., this would be Letter, 8.5"x11") with a - * set of fixed margings to allow for proper operation of the - * printer mechanics. This would lead to a page being 66 lines - * of 80 characters each. + * Simple old text printers were unable to do any formatting + * of the text. They were just sheets of paper with a fixed + * size (in the U.S., this would be Letter, 8.5"x11") with a + * set of fixed margings to allow for proper operation of the + * printer mechanics. This would lead to a page being 66 lines + * of 80 characters each. * * * - * Author: Fred N. van Kempen, + * Authors: Fred N. van Kempen, * - * Copyright 2018,2019 Fred N. van Kempen. + * Copyright 2018,2019 Fred N. van Kempen. * - * Redistribution and use in source and binary forms, with - * or without modification, are permitted provided that the - * following conditions are met: + * Redistribution and use in source and binary forms, with + * or without modification, are permitted provided that the + * following conditions are met: * - * 1. Redistributions of source code must retain the entire - * above notice, this list of conditions and the following - * disclaimer. + * 1. Redistributions of source code must retain the entire + * above notice, this list of conditions and the following + * disclaimer. * - * 2. Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other - * materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other + * materials provided with the distribution. * - * 3. Neither the name of the copyright holder nor the names - * of its contributors may be used to endorse or promote - * products derived from this software without specific - * prior written permission. + * 3. Neither the name of the copyright holder nor the names + * of its contributors may be used to endorse or promote + * products derived from this software without specific + * prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT From f4c2cba3e0ce5066fc081cb2682cce1ed59ee841 Mon Sep 17 00:00:00 2001 From: cold-brewed Date: Fri, 28 Oct 2022 13:48:59 -0400 Subject: [PATCH 02/60] qt: Move ui pause state update to plat_pause --- src/qt/qt_mainwindow.cpp | 11 +++++++---- src/qt/qt_mainwindow.hpp | 1 + src/qt/qt_platform.cpp | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 2a41f4316..e97864a3a 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -754,10 +754,6 @@ void MainWindow::on_actionCtrl_Alt_Esc_triggered() { void MainWindow::on_actionPause_triggered() { plat_pause(dopause ^ 1); - auto pause_icon = dopause ? QIcon(":/menuicons/win/icons/run.ico") : QIcon(":/menuicons/win/icons/pause.ico"); - auto tooltip_text = dopause ? QString(tr("Resume execution")) : QString(tr("Pause execution")); - ui->actionPause->setIcon(pause_icon); - ui->actionPause->setToolTip(tooltip_text); } void MainWindow::on_actionExit_triggered() { @@ -2056,6 +2052,13 @@ void MainWindow::setSendKeyboardInput(bool enabled) send_keyboard_input = enabled; } +void MainWindow::setUiPauseState(bool paused) { + auto pause_icon = paused ? QIcon(":/menuicons/win/icons/run.ico") : QIcon(":/menuicons/win/icons/pause.ico"); + auto tooltip_text = paused ? QString(tr("Resume execution")) : QString(tr("Pause execution")); + ui->actionPause->setIcon(pause_icon); + ui->actionPause->setToolTip(tooltip_text); +} + void MainWindow::on_actionPreferences_triggered() { ProgSettings progsettings(this); diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index c48333706..a91fd1f57 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -33,6 +33,7 @@ public: void blitToWidget(int x, int y, int w, int h, int monitor_index); QSize getRenderWidgetSize(); void setSendKeyboardInput(bool enabled); + void setUiPauseState(bool paused); std::array, 8> renderers; signals: diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 10a6654c0..4163b0ce5 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -366,6 +366,7 @@ plat_pause(int p) ui_window_title(oldtitle); } discord_update_activity(dopause); + main_window->setUiPauseState(p); #ifdef Q_OS_WINDOWS if (source_hwnd) From 1250a2114c46c5c06c451aee7be4b66806480641 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Oct 2022 03:36:48 +0200 Subject: [PATCH 03/60] Added the AcerMagic S20 based on the AzTech Washington, closes #859. --- src/include/86box/sound.h | 1 + src/sound/snd_azt2316a.c | 117 ++++++++++++++++++++++++++++++++++++-- src/sound/sound.c | 1 + 3 files changed, 114 insertions(+), 5 deletions(-) diff --git a/src/include/86box/sound.h b/src/include/86box/sound.h index 9d4ddff06..22606b481 100644 --- a/src/include/86box/sound.h +++ b/src/include/86box/sound.h @@ -80,6 +80,7 @@ extern const device_t adgold_device; /* Aztech Sound Galaxy 16 */ extern const device_t azt2316a_device; +extern const device_t acermagic_s20_device; extern const device_t azt1605_device; /* Ensoniq AudioPCI */ diff --git a/src/sound/snd_azt2316a.c b/src/sound/snd_azt2316a.c index ad5d0208e..bb497e3f2 100644 --- a/src/sound/snd_azt2316a.c +++ b/src/sound/snd_azt2316a.c @@ -891,12 +891,15 @@ azt_init(const device_t *info) azt2316a_t *azt2316a = malloc(sizeof(azt2316a_t)); memset(azt2316a, 0, sizeof(azt2316a_t)); - azt2316a->type = info->local; + azt2316a->type = info->local & 0x7fffffff; if (azt2316a->type == SB_SUBTYPE_CLONE_AZT1605_0X0C) { fn = "azt1605.nvr"; } else if (azt2316a->type == SB_SUBTYPE_CLONE_AZT2316A_0X11) { - fn = "azt2316a.nvr"; + if (info->local & 0x80000000) + fn = "acermagic_s20.nvr"; + else + fn = "azt2316a.nvr"; } /* config */ @@ -982,7 +985,9 @@ azt_init(const device_t *info) else fatal("AZT2316A: invalid sb irq in config word %08X\n", azt2316a->config_word); - switch (azt2316a->config_word & (3 << 6)) { + if (info->local & 0x80000000) + azt2316a->cur_dma = 1; + else switch (azt2316a->config_word & (3 << 6)) { case 1 << 6: azt2316a->cur_dma = 0; break; @@ -1112,7 +1117,10 @@ azt_init(const device_t *info) azt2316a->cur_wss_enabled = 0; // these are not present on the EEPROM - azt2316a->cur_dma = device_get_config_int("sb_dma8"); // TODO: investigate TSR to make this work with it - there is no software configurable DMA8? + if (info->local & 0x80000000) + azt2316a->cur_dma = 1; + else + azt2316a->cur_dma = device_get_config_int("sb_dma8"); // TODO: investigate TSR to make this work with it - there is no software configurable DMA8? azt2316a->cur_wss_irq = device_get_config_int("wss_irq"); azt2316a->cur_wss_dma = device_get_config_int("wss_dma"); azt2316a->cur_mode = 0; @@ -1125,7 +1133,10 @@ azt_init(const device_t *info) azt2316a->wss_interrupt_after_config = device_get_config_int("wss_interrupt_after_config"); /* wss part */ - ad1848_init(&azt2316a->ad1848, device_get_config_int("codec")); + if (info->local & 0x80000000) + ad1848_init(&azt2316a->ad1848, AD1848_TYPE_CS4231); + else + ad1848_init(&azt2316a->ad1848, device_get_config_int("codec")); ad1848_setirq(&azt2316a->ad1848, azt2316a->cur_wss_irq); ad1848_setdma(&azt2316a->ad1848, azt2316a->cur_wss_dma); @@ -1491,6 +1502,88 @@ static const device_config_t azt2316a_config[] = { // clang-format on }; +static const device_config_t acermagic_s20_config[] = { + // clang-format off + { + .name = "wss_interrupt_after_config", + .description = "Raise CODEC interrupt on CODEC setup (needed by some drivers)", + .type = CONFIG_BINARY, + .default_int = 0 + }, + { + .name = "addr", + .description = "SB Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { + .description = "0x220", + .value = 0x220 + }, + { + .description = "0x240", + .value = 0x240 + }, + { + .description = "Use EEPROM setting", + .value = 0 + }, + { + .description = "" + } + } + }, + { + .name = "wss_irq", + .description = "WSS IRQ", + .type = CONFIG_SELECTION, + .selection = { + { + .description = "IRQ 11", + .value = 11 + }, + { + .description = "IRQ 10", + .value = 10 + }, + { + .description = "IRQ 7", + .value = 7 + }, + { + .description = "" + } + }, + .default_int = 10 + }, + { + .name = "opl", + .description = "Enable OPL", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input", + .description = "Receive input (SB MIDI)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 1 + }, + { + .name = "receive_input401", + .description = "Receive input (MPU-401)", + .type = CONFIG_BINARY, + .default_string = "", + .default_int = 0 + }, + { .name = "", .description = "", .type = CONFIG_END } +// clang-format on +}; + const device_t azt2316a_device = { .name = "Aztech Sound Galaxy Pro 16 AB (Washington)", .internal_name = "azt2316a", @@ -1505,6 +1598,20 @@ const device_t azt2316a_device = { .config = azt2316a_config }; +const device_t acermagic_s20_device = { + .name = "AcerMagic S20", + .internal_name = "acermagic_s20", + .flags = DEVICE_ISA | DEVICE_AT, + .local = SB_SUBTYPE_CLONE_AZT2316A_0X11 | 0x80000000, + .init = azt_init, + .close = azt_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = azt_speed_changed, + .force_redraw = NULL, + .config = acermagic_s20_config +}; + const device_t azt1605_device = { .name = "Aztech Sound Galaxy Nova 16 Extra (Clinton)", .internal_name = "azt1605", diff --git a/src/sound/sound.c b/src/sound/sound.c index 6d5e56cc0..1efdef79b 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -109,6 +109,7 @@ static const SOUND_CARD sound_cards[] = { // clang-format off { &sound_none_device }, { &sound_internal_device }, + { &acermagic_s20_device }, { &adlib_device }, { &adgold_device }, { &azt2316a_device }, From 4d19b8a1e4011720e01107f2ad66b5f2d53eaae9 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Oct 2022 06:44:30 +0200 Subject: [PATCH 04/60] Added the ability to select earlier CD-ROM drive (emulates Chinon CDS-431 for SCSI and NEC CDR-260 for ATAPI) - needs to be ported to QT. --- src/cdrom/cdrom.c | 117 +++++++++++++++--- src/config.c | 11 +- src/disk/hdc_ide.c | 9 +- src/include/86box/cdrom.h | 2 +- src/include/86box/language.h | 5 +- src/include/86box/resource.h | 64 +++++----- src/include/86box/scsi_cdrom.h | 2 +- src/include/86box/scsi_device.h | 4 + src/scsi/scsi_cdrom.c | 213 ++++++++++++++++++++------------ src/win/languages/cs-CZ.rc | 14 ++- src/win/languages/de-DE.rc | 18 +-- src/win/languages/dialogs.rc | 7 +- src/win/languages/en-GB.rc | 2 + src/win/languages/en-US.rc | 2 + src/win/languages/es-ES.rc | 14 ++- src/win/languages/fi-FI.rc | 14 ++- src/win/languages/fr-FR.rc | 16 +-- src/win/languages/hr-HR.rc | 16 +-- src/win/languages/hu-HU.rc | 16 +-- src/win/languages/it-IT.rc | 16 +-- src/win/languages/ja-JP.rc | 16 +-- src/win/languages/ko-KR.rc | 34 ++--- src/win/languages/pl-PL.rc | 16 +-- src/win/languages/pt-BR.rc | 10 +- src/win/languages/pt-PT.rc | 34 ++--- src/win/languages/ru-RU.rc | 16 +-- src/win/languages/sl-SI.rc | 30 ++--- src/win/languages/tr-TR.rc | 34 ++--- src/win/languages/uk-UA.rc | 14 ++- src/win/languages/zh-CN.rc | 12 +- src/win/win_settings.c | 56 +++++++-- 31 files changed, 539 insertions(+), 295 deletions(-) diff --git a/src/cdrom/cdrom.c b/src/cdrom/cdrom.c index 86907c2e4..f4da5ce13 100644 --- a/src/cdrom/cdrom.c +++ b/src/cdrom/cdrom.c @@ -321,6 +321,34 @@ cdrom_audio_callback(cdrom_t *dev, int16_t *output, int len) return ret; } +static __inline int +bin2bcd (int x) +{ + return (x % 10) | ((x / 10) << 4); +} + +static __inline int +bcd2bin (int x) +{ + return (x >> 4) * 10 + (x & 0x0f); +} + +static void +msf_from_bcd(int *m, int *s, int *f) +{ + *m = bcd2bin(*m); + *s = bcd2bin(*s); + *f = bcd2bin(*f); +} + +static void +msf_to_bcd(int *m, int *s, int *f) +{ + *m = bin2bcd(*m); + *s = bin2bcd(*s); + *f = bin2bcd(*f); +} + uint8_t cdrom_audio_play(cdrom_t *dev, uint32_t pos, uint32_t len, int ismsf) { @@ -347,6 +375,10 @@ cdrom_audio_play(cdrom_t *dev, uint32_t pos, uint32_t len, int ismsf) s = (pos >> 8) & 0xff; f = pos & 0xff; + /* NEC CDR-260 speaks BCD. */ + if ((dev->bus_type == CDROM_BUS_ATAPI) && dev->early) + msf_from_bcd(&m, &s, &f); + if (pos == 0xffffff) { cdrom_log("CD-ROM %i: Playing from current position (MSF)\n", dev->id); pos = dev->seek_pos; @@ -356,6 +388,11 @@ cdrom_audio_play(cdrom_t *dev, uint32_t pos, uint32_t len, int ismsf) m = (len >> 16) & 0xff; s = (len >> 8) & 0xff; f = len & 0xff; + + /* NEC CDR-260 speaks BCD. */ + if ((dev->bus_type == CDROM_BUS_ATAPI) && dev->early) + msf_from_bcd(&m, &s, &f); + len = MSFtoLBA(m, s, f) - 150; cdrom_log("CD-ROM %i: MSF - pos = %08X len = %08X\n", dev->id, pos, len); @@ -462,7 +499,7 @@ cdrom_get_current_subchannel(cdrom_t *dev, uint8_t *b, int msf) { uint8_t ret; subchannel_t subc; - int pos = 1; + int pos = 1, m, s, f; uint32_t dat; dev->ops->get_subchannel(dev, dev->seek_pos, &subc); @@ -488,14 +525,41 @@ cdrom_get_current_subchannel(cdrom_t *dev, uint8_t *b, int msf) if (msf) { b[pos] = 0; - b[pos + 1] = subc.abs_m; - b[pos + 2] = subc.abs_s; - b[pos + 3] = subc.abs_f; + + /* NEC CDR-260 speaks BCD. */ + if ((dev->bus_type == CDROM_BUS_ATAPI) && dev->early) { + m = subc.abs_m; + s = subc.abs_s; + f = subc.abs_f; + msf_to_bcd(&m, &s, &f); + b[pos + 1] = m; + b[pos + 2] = s; + b[pos + 3] = f; + } else { + b[pos + 1] = subc.abs_m; + b[pos + 2] = subc.abs_s; + b[pos + 3] = subc.abs_f; + } + pos += 4; + b[pos] = 0; - b[pos + 1] = subc.rel_m; - b[pos + 2] = subc.rel_s; - b[pos + 3] = subc.rel_f; + + /* NEC CDR-260 speaks BCD. */ + if ((dev->bus_type == CDROM_BUS_ATAPI) && dev->early) { + m = subc.rel_m; + s = subc.rel_s; + f = subc.rel_f; + msf_to_bcd(&m, &s, &f); + b[pos + 1] = m; + b[pos + 2] = s; + b[pos + 3] = f; + } else { + b[pos + 1] = subc.rel_m; + b[pos + 2] = subc.rel_s; + b[pos + 3] = subc.rel_f; + } + pos += 4; } else { dat = MSFtoLBA(subc.abs_m, subc.abs_s, subc.abs_f) - 150; @@ -550,6 +614,7 @@ read_toc_normal(cdrom_t *dev, unsigned char *b, unsigned char start_track, int m { track_info_t ti; int i, len = 4; + int m, s, f; int first_track, last_track; uint32_t temp; @@ -600,9 +665,21 @@ read_toc_normal(cdrom_t *dev, unsigned char *b, unsigned char start_track, int m if (msf) { b[len++] = 0; - b[len++] = ti.m; - b[len++] = ti.s; - b[len++] = ti.f; + + /* NEC CDR-260 speaks BCD. */ + if ((dev->bus_type == CDROM_BUS_ATAPI) && dev->early) { + m = ti.m; + s = ti.s; + f = ti.f; + msf_to_bcd(&m, &s, &f); + b[len++] = m; + b[len++] = s; + b[len++] = f; + } else { + b[len++] = ti.m; + b[len++] = ti.s; + b[len++] = ti.f; + } } else { temp = MSFtoLBA(ti.m, ti.s, ti.f) - 150; b[len++] = temp >> 24; @@ -619,7 +696,7 @@ static int read_toc_session(cdrom_t *dev, unsigned char *b, int msf) { track_info_t ti; - int len = 4; + int len = 4, m, s, f; uint32_t temp; cdrom_log("read_toc_session(%08X, %08X, %i)\n", dev, b, msf); @@ -638,9 +715,21 @@ read_toc_session(cdrom_t *dev, unsigned char *b, int msf) if (msf) { b[len++] = 0; - b[len++] = ti.m; - b[len++] = ti.s; - b[len++] = ti.f; + + /* NEC CDR-260 speaks BCD. */ + if ((dev->bus_type == CDROM_BUS_ATAPI) && dev->early) { + m = ti.m; + s = ti.s; + f = ti.f; + msf_to_bcd(&m, &s, &f); + b[len++] = m; + b[len++] = s; + b[len++] = f; + } else { + b[len++] = ti.m; + b[len++] = ti.s; + b[len++] = ti.f; + } } else { temp = MSFtoLBA(ti.m, ti.s, ti.f) - 150; b[len++] = temp >> 24; diff --git a/src/config.c b/src/config.c index 702f41fe4..9c9779984 100644 --- a/src/config.c +++ b/src/config.c @@ -1321,6 +1321,8 @@ load_floppy_and_cdrom_drives(void) sprintf(temp, "cdrom_%02i_speed", c + 1); cdrom[c].speed = ini_section_get_int(cat, temp, 8); + sprintf(temp, "cdrom_%02i_early", c + 1); + cdrom[c].early = ini_section_get_int(cat, temp, 0); /* Default values, needed for proper operation of the Settings dialog. */ cdrom[c].ide_channel = cdrom[c].scsi_device_id = c + 2; @@ -2637,7 +2639,7 @@ save_hard_disks(void) if (!hdd_is_valid(c) || (hdd[c].bus != HDD_BUS_IDE && hdd[c].bus != HDD_BUS_ESDI)) ini_section_delete_var(cat, temp); else - ini_section_set_string(cat, temp, hdd_preset_get_internal_name(hdd[c].speed_preset)); + ini_section_set_string(cat, temp, (char *) hdd_preset_get_internal_name(hdd[c].speed_preset)); } ini_delete_section_if_empty(config, cat); @@ -2714,6 +2716,13 @@ save_floppy_and_cdrom_drives(void) ini_section_set_int(cat, temp, cdrom[c].speed); } + sprintf(temp, "cdrom_%02i_early", c + 1); + if ((cdrom[c].bus_type == 0) || (cdrom[c].early == 1)) { + ini_section_delete_var(cat, temp); + } else { + ini_section_set_int(cat, temp, cdrom[c].early); + } + sprintf(temp, "cdrom_%02i_parameters", c + 1); if (cdrom[c].bus_type == 0) { ini_section_delete_var(cat, temp); diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 8cb9fd951..35dfe5dcd 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -2157,11 +2157,10 @@ ide_callback(void *priv) ide_set_signature(ide); if (ide->type == IDE_ATAPI) { -#ifdef EARLY_ATAPI - ide->sc->status = DRDY_STAT | DSC_STAT; -#else - ide->sc->status = 0; -#endif + if (ide->sc->pad0) /* pad0 = early */ + ide->sc->status = DRDY_STAT | DSC_STAT; + else + ide->sc->status = 0; ide->sc->error = 1; if (ide->device_reset) ide->device_reset(ide->sc); diff --git a/src/include/86box/cdrom.h b/src/include/86box/cdrom.h index 3be2910c8..c74e8eb76 100644 --- a/src/include/86box/cdrom.h +++ b/src/include/86box/cdrom.h @@ -111,7 +111,7 @@ typedef struct cdrom { char *image_history[CD_IMAGE_HISTORY]; uint32_t sound_on, cdrom_capacity, - pad, seek_pos, + early, seek_pos, seek_diff, cd_end; int host_drive, prev_host_drive, diff --git a/src/include/86box/language.h b/src/include/86box/language.h index 7ba19e630..6c7ad728f 100644 --- a/src/include/86box/language.h +++ b/src/include/86box/language.h @@ -134,6 +134,7 @@ #define IDS_2158 2158 // "Hard reset" #define IDS_2159 2159 // "ACPI shutdown" #define IDS_2160 2160 // "Settings" +#define IDS_2161 2161 // "Early drive" #define IDS_4096 4096 // "Hard disk (%s)" #define IDS_4097 4097 // "%01i:%01i" @@ -242,8 +243,8 @@ #define IDS_LANG_ENUS IDS_7168 -#define STR_NUM_2048 106 -#define STR_NUM_3072 11 +#define STR_NUM_2048 114 +// UNUSED: #define STR_NUM_3072 11 #define STR_NUM_4096 40 #define STR_NUM_4352 6 #define STR_NUM_4608 6 diff --git a/src/include/86box/resource.h b/src/include/86box/resource.h index 27207a157..c45f7cf60 100644 --- a/src/include/86box/resource.h +++ b/src/include/86box/resource.h @@ -130,9 +130,8 @@ #define IDT_CD_DRIVES 1754 /* CD-ROM drives: */ #define IDT_CD_BUS 1755 /* Bus: */ #define IDT_CD_ID 1756 /* ID: */ -#define IDT_CD_LUN 1757 /* LUN: */ -#define IDT_CD_CHANNEL 1758 /* Channel: */ -#define IDT_CD_SPEED 1759 /* Speed: */ +#define IDT_CD_CHANNEL 1757 /* Channel: */ +#define IDT_CD_SPEED 1758 /* Speed: */ /* DLG_CFG_OTHER_REMOVABLE_DEVICES */ #define IDT_MO_DRIVES 1760 /* MO drives: */ @@ -277,38 +276,39 @@ #define IDC_COMBO_CD_ID 1127 #define IDC_COMBO_CD_LUN 1128 #define IDC_COMBO_CD_CHANNEL_IDE 1129 +#define IDC_CHECKEARLY 1130 -#define IDC_LIST_ZIP_DRIVES 1130 /* other removable devices config */ -#define IDC_COMBO_ZIP_BUS 1131 -#define IDC_COMBO_ZIP_ID 1132 -#define IDC_COMBO_ZIP_LUN 1133 -#define IDC_COMBO_ZIP_CHANNEL_IDE 1134 -#define IDC_CHECK250 1135 -#define IDC_COMBO_CD_SPEED 1136 -#define IDC_LIST_MO_DRIVES 1137 -#define IDC_COMBO_MO_BUS 1138 -#define IDC_COMBO_MO_ID 1139 -#define IDC_COMBO_MO_LUN 1140 -#define IDC_COMBO_MO_CHANNEL_IDE 1141 -#define IDC_COMBO_MO_TYPE 1142 +#define IDC_LIST_ZIP_DRIVES 1140 /* other removable devices config */ +#define IDC_COMBO_ZIP_BUS 1141 +#define IDC_COMBO_ZIP_ID 1142 +#define IDC_COMBO_ZIP_LUN 1143 +#define IDC_COMBO_ZIP_CHANNEL_IDE 1144 +#define IDC_CHECK250 1145 +#define IDC_COMBO_CD_SPEED 1146 +#define IDC_LIST_MO_DRIVES 1147 +#define IDC_COMBO_MO_BUS 1148 +#define IDC_COMBO_MO_ID 1149 +#define IDC_COMBO_MO_LUN 1150 +#define IDC_COMBO_MO_CHANNEL_IDE 1151 +#define IDC_COMBO_MO_TYPE 1152 -#define IDC_CHECK_BUGGER 1150 /* other periph config */ -#define IDC_CHECK_POSTCARD 1151 -#define IDC_COMBO_ISARTC 1152 -#define IDC_CONFIGURE_ISARTC 1153 -#define IDC_COMBO_FDC 1154 -#define IDC_CONFIGURE_FDC 1155 -#define IDC_GROUP_ISAMEM 1156 -#define IDC_COMBO_ISAMEM_1 1157 -#define IDC_COMBO_ISAMEM_2 1158 -#define IDC_COMBO_ISAMEM_3 1159 -#define IDC_COMBO_ISAMEM_4 1160 -#define IDC_CONFIGURE_ISAMEM_1 1161 -#define IDC_CONFIGURE_ISAMEM_2 1162 -#define IDC_CONFIGURE_ISAMEM_3 1163 -#define IDC_CONFIGURE_ISAMEM_4 1164 +#define IDC_CHECK_BUGGER 1160 /* other periph config */ +#define IDC_CHECK_POSTCARD 1161 +#define IDC_COMBO_ISARTC 1162 +#define IDC_CONFIGURE_ISARTC 1163 +#define IDC_COMBO_FDC 1164 +#define IDC_CONFIGURE_FDC 1165 +#define IDC_GROUP_ISAMEM 1166 +#define IDC_COMBO_ISAMEM_1 1167 +#define IDC_COMBO_ISAMEM_2 1168 +#define IDC_COMBO_ISAMEM_3 1169 +#define IDC_COMBO_ISAMEM_4 1170 +#define IDC_CONFIGURE_ISAMEM_1 1171 +#define IDC_CONFIGURE_ISAMEM_2 1172 +#define IDC_CONFIGURE_ISAMEM_3 1173 +#define IDC_CONFIGURE_ISAMEM_4 1174 -#define IDC_SLIDER_GAIN 1170 /* sound gain dialog */ +#define IDC_SLIDER_GAIN 1180 /* sound gain dialog */ #define IDC_EDIT_FILE_NAME 1200 /* new floppy image dialog */ #define IDC_COMBO_DISK_SIZE 1201 diff --git a/src/include/86box/scsi_cdrom.h b/src/include/86box/scsi_cdrom.h index f278a2f42..e991ccc36 100644 --- a/src/include/86box/scsi_cdrom.h +++ b/src/include/86box/scsi_cdrom.h @@ -36,7 +36,7 @@ typedef struct { uint8_t status, phase, error, id, features, cur_lun, - pad0, pad1; + early, pad1; uint16_t request_length, max_transfer_len; diff --git a/src/include/86box/scsi_device.h b/src/include/86box/scsi_device.h index bef94ed96..650215cb5 100644 --- a/src/include/86box/scsi_device.h +++ b/src/include/86box/scsi_device.h @@ -64,6 +64,7 @@ #define GPCMD_PREVENT_REMOVAL 0x1e #define GPCMD_READ_FORMAT_CAPACITIES 0x23 #define GPCMD_READ_CDROM_CAPACITY 0x25 +#define GPCMD_CHINON_UNKNOWN 0x26 #define GPCMD_READ_10 0x28 #define GPCMD_READ_GENERATION 0x29 #define GPCMD_WRITE_10 0x2a @@ -105,11 +106,13 @@ #define GPCMD_MECHANISM_STATUS 0xbd #define GPCMD_READ_CD 0xbe #define GPCMD_SEND_DVD_STRUCTURE 0xbf /* This is for writing only, irrelevant to 86Box. */ +#define GPCMD_CHINON_EJECT 0xc0 /* Chinon Vendor Unique command */ #define GPCMD_AUDIO_TRACK_SEARCH 0xc0 /* Toshiba Vendor Unique command */ #define GPCMD_TOSHIBA_PLAY_AUDIO 0xc1 /* Toshiba Vendor Unique command */ #define GPCMD_PAUSE_RESUME_ALT 0xc2 #define GPCMD_STILL 0xc2 /* Toshiba Vendor Unique command */ #define GPCMD_CADDY_EJECT 0xc4 /* Toshiba Vendor Unique command */ +#define GPCMD_CHINON_STOP 0xc6 /* Chinon Vendor Unique command */ #define GPCMD_READ_SUBCODEQ_PLAYING_STATUS 0xc6 /* Toshiba Vendor Unique command */ #define GPCMD_READ_DISC_INFORMATION_TOSHIBA 0xc7 /* Toshiba Vendor Unique command */ #define GPCMD_SCAN_ALT 0xcd /* Should be equivalent to 0xba */ @@ -249,6 +252,7 @@ #define MMC_PROFILE_HDDVD_RW_DL 0x005A #define MMC_PROFILE_INVALID 0xFFFF +#define EARLY_ONLY 64 #define SCSI_ONLY 32 #define ATAPI_ONLY 16 #define IMPLEMENTED 8 diff --git a/src/scsi/scsi_cdrom.c b/src/scsi/scsi_cdrom.c index 6e983e720..553291263 100644 --- a/src/scsi/scsi_cdrom.c +++ b/src/scsi/scsi_cdrom.c @@ -81,7 +81,8 @@ const uint8_t scsi_cdrom_command_flags[0x100] = { IMPLEMENTED | CHECK_READY, /* 0x1E */ 0, 0, 0, 0, 0, 0, /* 0x1F-0x24 */ IMPLEMENTED | CHECK_READY, /* 0x25 */ - 0, 0, /* 0x26-0x27 */ + IMPLEMENTED | CHECK_READY | SCSI_ONLY | EARLY_ONLY,/* 0x26 */ + 0, /* 0x27 */ IMPLEMENTED | CHECK_READY, /* 0x28 */ 0, 0, /* 0x29-0x2A */ IMPLEMENTED | CHECK_READY | NONDATA, /* 0x2B */ @@ -349,11 +350,10 @@ scsi_cdrom_init(scsi_cdrom_t *dev) dev->sense[0] = 0xf0; dev->sense[7] = 10; -#ifdef POSSIBLE_EARLY_ATAPI - dev->status = READY_STAT | DSC_STAT; -#else - dev->status = 0; -#endif + if (dev->early) + dev->status = READY_STAT | DSC_STAT; + else + dev->status = 0; dev->pos = 0; dev->packet_status = PHASE_NONE; scsi_cdrom_sense_key = scsi_cdrom_asc = scsi_cdrom_ascq = dev->unit_attention = 0; @@ -1174,6 +1174,12 @@ scsi_cdrom_pre_execution_check(scsi_cdrom_t *dev, uint8_t *cdb) return 0; } + if (!dev->early && (scsi_cdrom_command_flags[cdb[0]] & EARLY_ONLY)) { + scsi_cdrom_log("CD-ROM %i: Attempting to execute SCSI-only command %02X over ATAPI\n", dev->id, cdb[0]); + scsi_cdrom_illegal_opcode(dev); + return 0; + } + if ((dev->drv->bus_type < CDROM_BUS_SCSI) && (scsi_cdrom_command_flags[cdb[0]] & SCSI_ONLY)) { scsi_cdrom_log("CD-ROM %i: Attempting to execute SCSI-only command %02X over ATAPI\n", dev->id, cdb[0]); scsi_cdrom_illegal_opcode(dev); @@ -1998,19 +2004,27 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb) scsi_cdrom_data_command_finish(dev, len, len, max_len, 0); break; + /* GPCMD_CHINON_EJECT on Chinon */ case GPCMD_AUDIO_TRACK_SEARCH: - scsi_cdrom_set_phase(dev, SCSI_PHASE_STATUS); - if ((dev->drv->host_drive < 1) || (dev->drv->cd_status <= CD_STATUS_DATA_ONLY)) { - scsi_cdrom_illegal_mode(dev); - break; - } - pos = (cdb[2] << 24) | (cdb[3] << 16) | (cdb[4] << 8) | cdb[5]; - ret = cdrom_audio_track_search(dev->drv, pos, cdb[9], cdb[1] & 1); - - if (ret) + if (dev->early) { + scsi_cdrom_set_phase(dev, SCSI_PHASE_STATUS); + scsi_cdrom_stop(sc); + cdrom_eject(dev->id); scsi_cdrom_command_complete(dev); - else - scsi_cdrom_illegal_mode(dev); + } else { + scsi_cdrom_set_phase(dev, SCSI_PHASE_STATUS); + if ((dev->drv->host_drive < 1) || (dev->drv->cd_status <= CD_STATUS_DATA_ONLY)) { + scsi_cdrom_illegal_mode(dev); + break; + } + pos = (cdb[2] << 24) | (cdb[3] << 16) | (cdb[4] << 8) | cdb[5]; + ret = cdrom_audio_track_search(dev->drv, pos, cdb[9], cdb[1] & 1); + + if (ret) + scsi_cdrom_command_complete(dev); + else + scsi_cdrom_illegal_mode(dev); + } break; case GPCMD_TOSHIBA_PLAY_AUDIO: @@ -2149,13 +2163,13 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb) dev->buffer[1] = 0x11; break; case CD_STATUS_PAUSED: - dev->buffer[1] = 0x12; + dev->buffer[1] = ((dev->drv->bus_type == CDROM_BUS_SCSI) && dev->early) ? 0x15 : 0x12; break; case CD_STATUS_DATA_ONLY: - dev->buffer[1] = 0x15; + dev->buffer[1] = ((dev->drv->bus_type == CDROM_BUS_SCSI) && dev->early) ? 0x00 : 0x15; break; default: - dev->buffer[1] = 0x13; + dev->buffer[1] = ((dev->drv->bus_type == CDROM_BUS_SCSI) && dev->early) ? 0x00 : 0x13; break; } @@ -2168,35 +2182,42 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb) scsi_cdrom_data_command_finish(dev, len, len, len, 0); break; + /* GPCMD_CHINON_STOP on Chinon */ case GPCMD_READ_SUBCODEQ_PLAYING_STATUS: - scsi_cdrom_set_phase(dev, SCSI_PHASE_DATA_IN); - - alloc_length = cdb[1] & 0x1f; - - scsi_cdrom_buf_alloc(dev, alloc_length); - - if (!dev->drv->ops) { - scsi_cdrom_not_ready(dev); - return; - } - - if (!alloc_length) { + if (dev->early) { scsi_cdrom_set_phase(dev, SCSI_PHASE_STATUS); - scsi_cdrom_log("CD-ROM %i: All done - callback set\n", dev->id); - dev->packet_status = PHASE_COMPLETE; - dev->callback = 20.0 * CDROM_TIME; - scsi_cdrom_set_callback(dev); - break; + scsi_cdrom_stop(sc); + scsi_cdrom_command_complete(dev); + } else { + scsi_cdrom_set_phase(dev, SCSI_PHASE_DATA_IN); + + alloc_length = cdb[1] & 0x1f; + + scsi_cdrom_buf_alloc(dev, alloc_length); + + if (!dev->drv->ops) { + scsi_cdrom_not_ready(dev); + return; + } + + if (!alloc_length) { + scsi_cdrom_set_phase(dev, SCSI_PHASE_STATUS); + scsi_cdrom_log("CD-ROM %i: All done - callback set\n", dev->id); + dev->packet_status = PHASE_COMPLETE; + dev->callback = 20.0 * CDROM_TIME; + scsi_cdrom_set_callback(dev); + break; + } + + len = alloc_length; + + memset(dev->buffer, 0, len); + dev->buffer[0] = cdrom_get_current_subcodeq_playstatus(dev->drv, &dev->buffer[1]); + scsi_cdrom_log("Audio Status = %02x\n", dev->buffer[0]); + + scsi_cdrom_set_buf_len(dev, BufLen, &alloc_length); + scsi_cdrom_data_command_finish(dev, len, len, len, 0); } - - len = alloc_length; - - memset(dev->buffer, 0, len); - dev->buffer[0] = cdrom_get_current_subcodeq_playstatus(dev->drv, &dev->buffer[1]); - scsi_cdrom_log("Audio Status = %02x\n", dev->buffer[0]); - - scsi_cdrom_set_buf_len(dev, BufLen, &alloc_length); - scsi_cdrom_data_command_finish(dev, len, len, len, 0); break; case GPCMD_READ_DVD_STRUCTURE: @@ -2235,6 +2256,12 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb) } break; + case GPCMD_CHINON_UNKNOWN: + scsi_cdrom_set_phase(dev, SCSI_PHASE_STATUS); + scsi_cdrom_stop(sc); + scsi_cdrom_command_complete(dev); + break; + case GPCMD_START_STOP_UNIT: scsi_cdrom_set_phase(dev, SCSI_PHASE_STATUS); @@ -2309,22 +2336,36 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb) dev->buffer[idx++] = 0x01; dev->buffer[idx++] = 0x00; dev->buffer[idx++] = 68; - if (dev->drv->bus_type == CDROM_BUS_SCSI) - ide_padstr8(dev->buffer + idx, 8, "TOSHIBA"); /* Vendor */ - else #ifdef USE_86BOX_CD - ide_padstr8(dev->buffer + idx, 8, EMU_NAME); /* Vendor */ + ide_padstr8(dev->buffer + idx, 8, EMU_NAME); /* Vendor */ #else - ide_padstr8(dev->buffer + idx, 8, "HITACHI"); /* Vendor */ + if (dev->drv->bus_type == CDROM_BUS_SCSI) { + if (dev->early) + ide_padstr8(dev->buffer + idx, 8, "CHINON"); /* Vendor */ + else + ide_padstr8(dev->buffer + idx, 8, "TOSHIBA"); /* Vendor */ + } else { + if (dev->early) + ide_padstr8(dev->buffer + idx, 8, "NEC"); /* Vendor */ + else + ide_padstr8(dev->buffer + idx, 8, "HITACHI"); /* Vendor */ + } #endif idx += 8; - if (dev->drv->bus_type == CDROM_BUS_SCSI) - ide_padstr8(dev->buffer + idx, 40, "XM6201TASUN32XCD1103"); /* Product */ - else #ifdef USE_86BOX_CD ide_padstr8(dev->buffer + idx, 40, device_identify_ex); /* Product */ #else - ide_padstr8(dev->buffer + idx, 40, "CDR-8130"); /* Product */ + if (dev->drv->bus_type == CDROM_BUS_SCSI) { + if (dev->early) + ide_padstr8(dev->buffer + idx, 40, "CD-ROM CDS-431"); /* Product */ + else + ide_padstr8(dev->buffer + idx, 40, "XM6201TASUN32XCD1103"); /* Product */ + } else { + if (dev->early) + ide_padstr8(dev->buffer + idx, 40, "CD-ROM DRIVE:260"); /* Product */ + else + ide_padstr8(dev->buffer + idx, 40, "CDR-8130"); /* Product */ + } #endif idx += 40; ide_padstr8(dev->buffer + idx, 20, "53R141"); /* Product */ @@ -2359,21 +2400,33 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb) dev->buffer[7] = 0x20; /* Wide bus supported */ } - if (dev->drv->bus_type == CDROM_BUS_SCSI) { - ide_padstr8(dev->buffer + 8, 8, "TOSHIBA"); /* Vendor */ - ide_padstr8(dev->buffer + 16, 16, "XM6201TASUN32XCD"); /* Product */ - ide_padstr8(dev->buffer + 32, 4, "1103"); /* Revision */ - } else { #ifdef USE_86BOX_CD - ide_padstr8(dev->buffer + 8, 8, EMU_NAME); /* Vendor */ - ide_padstr8(dev->buffer + 16, 16, device_identify); /* Product */ - ide_padstr8(dev->buffer + 32, 4, EMU_VERSION_EX); /* Revision */ + ide_padstr8(dev->buffer + 8, 8, EMU_NAME); /* Vendor */ + ide_padstr8(dev->buffer + 16, 16, device_identify); /* Product */ + ide_padstr8(dev->buffer + 32, 4, EMU_VERSION_EX); /* Revision */ #else - ide_padstr8(dev->buffer + 8, 8, "HITACHI"); /* Vendor */ - ide_padstr8(dev->buffer + 16, 16, "CDR-8130"); /* Product */ - ide_padstr8(dev->buffer + 32, 4, "0020"); /* Revision */ -#endif + if (dev->drv->bus_type == CDROM_BUS_SCSI) { + if (dev->early) { + ide_padstr8(dev->buffer + 8, 8, "CHINON"); /* Vendor */ + ide_padstr8(dev->buffer + 16, 16, "CD-ROM CDS-431"); /* Product */ + ide_padstr8(dev->buffer + 32, 4, "H42"); /* Revision */ + } else { + ide_padstr8(dev->buffer + 8, 8, "TOSHIBA"); /* Vendor */ + ide_padstr8(dev->buffer + 16, 16, "XM6201TASUN32XCD"); /* Product */ + ide_padstr8(dev->buffer + 32, 4, "1103"); /* Revision */ + } + } else { + if (dev->early) { + ide_padstr8(dev->buffer + 8, 8, "NEC"); /* Vendor */ + ide_padstr8(dev->buffer + 16, 16, "CD-ROM DRIVE:260"); /* Product */ + ide_padstr8(dev->buffer + 32, 4, "1.01"); /* Revision */ + } else { + ide_padstr8(dev->buffer + 8, 8, "HITACHI"); /* Vendor */ + ide_padstr8(dev->buffer + 16, 16, "CDR-8130"); /* Product */ + ide_padstr8(dev->buffer + 32, 4, "0020"); /* Revision */ + } } +#endif idx = 36; @@ -2645,25 +2698,30 @@ scsi_cdrom_identify(ide_t *ide, int ide_has_dma) scsi_cdrom_t *dev; char device_identify[9] = { '8', '6', 'B', '_', 'C', 'D', '0', '0', 0 }; - dev = (scsi_cdrom_t *) ide->p; + dev = (scsi_cdrom_t *) ide->sc; device_identify[7] = dev->id + 0x30; scsi_cdrom_log("ATAPI Identify: %s\n", device_identify); +#else + scsi_cdrom_t *dev = (scsi_cdrom_t *) ide->sc; #endif - ide->buffer[0] = 0x8000 | (5 << 8) | 0x80 | (2 << 5); /* ATAPI device, CD-ROM drive, removable media, accelerated DRQ */ + if (dev->early) + ide->buffer[0] = 0x8000 | (5 << 8) | 0x80 | (1 << 5); /* ATAPI device, CD-ROM drive, removable media, interrupt DRQ */ + else + ide->buffer[0] = 0x8000 | (5 << 8) | 0x80 | (2 << 5); /* ATAPI device, CD-ROM drive, removable media, accelerated DRQ */ ide_padstr((char *) (ide->buffer + 10), "", 20); /* Serial Number */ #ifdef USE_86BOX_CD ide_padstr((char *) (ide->buffer + 23), EMU_VERSION_EX, 8); /* Firmware */ ide_padstr((char *) (ide->buffer + 27), device_identify, 40); /* Model */ #else - #ifdef USE_NEC_CD - ide_padstr((char *) (ide->buffer + 23), "4.20 ", 8); /* Firmware */ - ide_padstr((char *) (ide->buffer + 27), "NEC CD-ROM DRIVE:273 ", 40); /* Model */ - #else - ide_padstr((char *) (ide->buffer + 23), "0020 ", 8); /* Firmware */ - ide_padstr((char *) (ide->buffer + 27), "HITACHI CDR-8130 ", 40); /* Model */ - #endif + if (dev->early) { + ide_padstr((char *) (ide->buffer + 23), "1.01 ", 8); /* Firmware */ + ide_padstr((char *) (ide->buffer + 27), "NEC CD-ROM DRIVE:260 ", 40); /* Model */ + } else { + ide_padstr((char *) (ide->buffer + 23), "0020 ", 8); /* Firmware */ + ide_padstr((char *) (ide->buffer + 27), "HITACHI CDR-8130 ", 40); /* Model */ + } #endif ide->buffer[49] = 0x200; /* LBA supported */ ide->buffer[126] = 0xfffe; /* Interpret zero byte count limit as maximum length */ @@ -2711,6 +2769,7 @@ scsi_cdrom_drive_reset(int c) dev->drv = drv; dev->cur_lun = SCSI_LUN_USE_CDB; + dev->early = dev->drv->early; drv->insert = scsi_cdrom_insert; drv->get_volume = scsi_cdrom_get_volume; @@ -2749,7 +2808,7 @@ scsi_cdrom_drive_reset(int c) id->phase_data_out = scsi_cdrom_phase_data_out; id->command_stop = scsi_cdrom_command_stop; id->bus_master_error = scsi_cdrom_bus_master_error; - id->interrupt_drq = 0; + id->interrupt_drq = !dev->early; ide_atapi_attach(id); } diff --git a/src/win/languages/cs-CZ.rc b/src/win/languages/cs-CZ.rc index 63279611c..1c431281b 100644 --- a/src/win/languages/cs-CZ.rc +++ b/src/win/languages/cs-CZ.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Načíst znova předchozí obraz", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Obraz...", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Složka", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Grafika:" #define STR_VOODOO "Použít grafický akcelerátor Voodoo" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "Grafika IBM 8514/a" +#define STR_XGA "Grafika XGA" #define STR_MOUSE "Myš:" #define STR_JOYSTICK "Joystick:" @@ -283,7 +283,7 @@ END #define STR_JOY4 "Joystick 4..." #define STR_SOUND "Zvuková karta:" -#define STR_MIDI_OUT "MIDI výstup:" +#define STR_MIDI_OUT "MIDI výstup:" #define STR_MIDI_IN "MIDI vstup:" #define STR_MPU401 "Samostatný MPU-401" #define STR_SSI "Innovation SSI-2001" @@ -291,8 +291,8 @@ END #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Použít zvuk FLOAT32" #define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRV_NUKED "Nuked (přesnější)" +#define STR_FM_DRV_YMFM "YMFM (rychlejší)" #define STR_NET_TYPE "Druh sítě:" #define STR_PCAP "PCap zařízení:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Kontrola BPB" #define STR_CDROM_DRIVES "Mechaniky CD-ROM:" #define STR_CD_SPEED "Rychlost:" +#define STR_EARLY "Časná mechanika" #define STR_MO_DRIVES "Magnetooptické mechaniky:" #define STR_ZIP_DRIVES "Mechaniky ZIP:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Resetovat" IDS_2159 "Vypnout skrze rozhraní ACPI" IDS_2160 "Nastavení" + IDS_2161 "Časná mechanika" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/de-DE.rc b/src/win/languages/de-DE.rc index a2436fb3e..ff67041b5 100644 --- a/src/win/languages/de-DE.rc +++ b/src/win/languages/de-DE.rc @@ -171,13 +171,13 @@ CdromSubmenu MENU DISCARDABLE BEGIN POPUP "" BEGIN - MENUITEM "&Stummschalten", IDM_CDROM_MUTE + MENUITEM "&Stummschalten", IDM_CDROM_MUTE MENUITEM SEPARATOR MENUITEM "L&eer", IDM_CDROM_EMPTY MENUITEM "&Voriges Image neu laden", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Image", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Verzeichnis", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Videokarte:" #define STR_VOODOO "Voodoo-Grafik" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "IBM 8514/a-Grafik" +#define STR_XGA "XGA-Grafik" #define STR_MOUSE "Maus:" #define STR_JOYSTICK "Joystick:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "Joystick 4..." #define STR_SOUND "Soundkarte:" -#define STR_MIDI_OUT "MIDI Out-Gerät:" +#define STR_MIDI_OUT "MIDI Out-Gerät:" #define STR_MIDI_IN "MIDI In-Gerät:" #define STR_MPU401 "Standalone-MPU-401-Gerät" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "FLOAT32-Wiedergabe benutzen" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "FM-Synth-Treiber" +#define STR_FM_DRV_NUKED "Nuked (genauer)" +#define STR_FM_DRV_YMFM "YMFM (schneller)" #define STR_NET_TYPE "Netzwerktyp:" #define STR_PCAP "PCap-Gerät:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "BPB überprüfen" #define STR_CDROM_DRIVES "CD-ROM-Laufwerke:" #define STR_CD_SPEED "Takt:" +#define STR_EARLY "Früheres Laufwerk" #define STR_MO_DRIVES "MO-Laufwerke:" #define STR_ZIP_DRIVES "ZIP-Laufwerke:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Hard-Reset" IDS_2159 "ACPI-basiertes Herunterfahren" IDS_2160 "Optionen" + IDS_2161 "Früheres Laufwerk" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/dialogs.rc b/src/win/languages/dialogs.rc index bd1eb87bd..3f3811c25 100644 --- a/src/win/languages/dialogs.rc +++ b/src/win/languages/dialogs.rc @@ -744,8 +744,12 @@ BEGIN LTEXT STR_CD_SPEED, IDT_CD_SPEED, CFG_HMARGIN, 207, 34, CFG_PANE_LTEXT_HEIGHT COMBOBOX IDC_COMBO_CD_SPEED, - 33, 205, 328, 12, + 33, 205, 140, 12, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + + CONTROL STR_EARLY, IDC_CHECKEARLY, + "Button", BS_AUTOCHECKBOX | WS_TABSTOP, + 186, 206, 84, CFG_CHECKBOX_HEIGHT END DLG_CFG_OTHER_REMOVABLE_DEVICES DIALOG DISCARDABLE CFG_PANE_LEFT, CFG_PANE_TOP, CFG_PANE_WIDTH, CFG_PANE_HEIGHT @@ -1011,6 +1015,7 @@ END #undef STR_CHECKBPB #undef STR_CDROM_DRIVES #undef STR_CD_SPEED +#undef STR_EARLY #undef STR_MO_DRIVES #undef STR_ZIP_DRIVES diff --git a/src/win/languages/en-GB.rc b/src/win/languages/en-GB.rc index 3eed04ed1..0321e6dea 100644 --- a/src/win/languages/en-GB.rc +++ b/src/win/languages/en-GB.rc @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Check BPB" #define STR_CDROM_DRIVES "CD-ROM drives:" #define STR_CD_SPEED "Speed:" +#define STR_EARLY "Earlier drive" #define STR_MO_DRIVES "MO drives:" #define STR_ZIP_DRIVES "ZIP drives:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Hard reset" IDS_2159 "ACPI shutdown" IDS_2160 "Settings" + IDS_2161 "Earlier drive" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/en-US.rc b/src/win/languages/en-US.rc index ac8b1f6ee..f061a061b 100644 --- a/src/win/languages/en-US.rc +++ b/src/win/languages/en-US.rc @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Check BPB" #define STR_CDROM_DRIVES "CD-ROM drives:" #define STR_CD_SPEED "Speed:" +#define STR_EARLY "Earlier drive" #define STR_MO_DRIVES "MO drives:" #define STR_ZIP_DRIVES "ZIP drives:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Hard reset" IDS_2159 "ACPI shutdown" IDS_2160 "Settings" + IDS_2161 "Earlier drive" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/es-ES.rc b/src/win/languages/es-ES.rc index 0aa8b3533..893759d62 100644 --- a/src/win/languages/es-ES.rc +++ b/src/win/languages/es-ES.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Recargar imagen previa", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Imagen...", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Carpeta", IDM_CDROM_DIR END END @@ -241,7 +241,7 @@ END #define STR_CANCEL "Cancelar" #define STR_GLOBAL "Salvar estos ajustes como por &defecto globalmente" #define STR_DEFAULT "&Por defecto" -#define STR_LANGUAGE "Idioma:" +#define STR_LANGUAGE "Idioma:" #define STR_ICONSET "Juego de iconos:" #define STR_GAIN "Ganancia" @@ -283,16 +283,16 @@ END #define STR_JOY4 "Mando 4..." #define STR_SOUND "Tarjeta de sonido:" -#define STR_MIDI_OUT "Dispositivo MIDI de salida:" +#define STR_MIDI_OUT "Dispositivo MIDI de salida:" #define STR_MIDI_IN "Dispositivo MIDI de entrada:" #define STR_MPU401 "MPU-401 independiente" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Usar sonido FLOAT32" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Controlador de sintet. FM" +#define STR_FM_DRV_NUKED "Nuked (más preciso)" +#define STR_FM_DRV_YMFM "YMFM (más rápido)" #define STR_NET_TYPE "Tipo de red:" #define STR_PCAP "Dispositivo PCap:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Chequear BPB" #define STR_CDROM_DRIVES "Unidades de CD-ROM:" #define STR_CD_SPEED "Velocidad:" +#define STR_EARLY "Unidad anterior" #define STR_MO_DRIVES "Unidades MO:" #define STR_ZIP_DRIVES "Unidades ZIP:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Hard reset" IDS_2159 "ACPI shutdown" IDS_2160 "Settings" + IDS_2161 "Unidad anterior" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/fi-FI.rc b/src/win/languages/fi-FI.rc index 43ddbc6da..ccf1a5940 100644 --- a/src/win/languages/fi-FI.rc +++ b/src/win/languages/fi-FI.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Lataa edellinen levykuva uudelleen", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "L&evykuva", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Kansio", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Näytönohjain:" #define STR_VOODOO "Voodoo-grafiikkasuoritin" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "IBM 8514/a-grafiikkasuoritin" +#define STR_XGA "XGA-grafiikkasuoritin" #define STR_MOUSE "Hiiri:" #define STR_JOYSTICK "Peliohjain:" @@ -290,9 +290,9 @@ END #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Käytä FLOAT32-ääntä" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "FM-syntetisaattoriohjain" +#define STR_FM_DRV_NUKED "Nuked (tarkempi)" +#define STR_FM_DRV_YMFM "YMFM (nopeampi)" #define STR_NET_TYPE "Verkon tyyppi:" #define STR_PCAP "PCap-laite:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Tarkista BPB" #define STR_CDROM_DRIVES "CD-ROM-asemat:" #define STR_CD_SPEED "Nopeus:" +#define STR_EARLY "Aiemmat asemat" #define STR_MO_DRIVES "Magneettisoptiset asemat (MO):" #define STR_ZIP_DRIVES "ZIP-asemat:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Kylmä uudelleenkäynnistys" IDS_2159 "ACPI-sammutus" IDS_2160 "Asetukset" + IDS_2161 "Aiemmat asemat" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/fr-FR.rc b/src/win/languages/fr-FR.rc index ddcb22341..858a2dacf 100644 --- a/src/win/languages/fr-FR.rc +++ b/src/win/languages/fr-FR.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Recharger image précedente", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Image", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Dossier", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Vidéo:" #define STR_VOODOO "Graphique Voodoo" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "Graphique IBM 8514/a" +#define STR_XGA "Graphique XGA" #define STR_MOUSE "Souris:" #define STR_JOYSTICK "Manette de commande:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "Manette 4..." #define STR_SOUND "Carte son:" -#define STR_MIDI_OUT "Sortie MIDI:" +#define STR_MIDI_OUT "Sortie MIDI:" #define STR_MIDI_IN "Entrée MIDI:" #define STR_MPU401 "MPU-401 autonome" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Utiliser le son FLOAT32" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Pilote de synthétiseur FM" +#define STR_FM_DRV_NUKED "Nuked (plus précis)" +#define STR_FM_DRV_YMFM "YMFM (plus rapide)" #define STR_NET_TYPE "Type de réseau:" #define STR_PCAP "Dispositif PCap:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Vérifier BPB" #define STR_CDROM_DRIVES "Lecterus CD-ROM:" #define STR_CD_SPEED "Vitesse:" +#define STR_EARLY "Lecteur plus tôt" #define STR_MO_DRIVES "Lecteurs magnéto-optiques:" #define STR_ZIP_DRIVES "Lecteurs ZIP:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Hard reset" IDS_2159 "ACPI shutdown" IDS_2160 "Settings" + IDS_2161 "Lecteur plus tôt" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/hr-HR.rc b/src/win/languages/hr-HR.rc index d608a079a..fcd4f9293 100644 --- a/src/win/languages/hr-HR.rc +++ b/src/win/languages/hr-HR.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Ponovo učitaj prethodnu sliku", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Slika", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Mapa", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Video:" #define STR_VOODOO "Voodoo grafika" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "IBM 8514/a grafika" +#define STR_XGA "XGA grafika" #define STR_MOUSE "Miš:" #define STR_JOYSTICK "Palica za igru:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "Palica za igru 4..." #define STR_SOUND "Zvučna kartica:" -#define STR_MIDI_OUT "Izlazni uređaj MIDI:" +#define STR_MIDI_OUT "Izlazni uređaj MIDI:" #define STR_MIDI_IN "Ulazni uređaj MIDI:" #define STR_MPU401 "Samostalni MPU-401" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Koristi FLOAT32 za zvuk" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Drajver za FM sintisajzer" +#define STR_FM_DRV_NUKED "Nuked (precizniji)" +#define STR_FM_DRV_YMFM "YMFM (brži)" #define STR_NET_TYPE "Tip mreže:" #define STR_PCAP "Uređaj PCap:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Provjeraj BPB" #define STR_CDROM_DRIVES "CD-ROM pogoni:" #define STR_CD_SPEED "Brzina:" +#define STR_EARLY "Raniji pogon" #define STR_MO_DRIVES "MO pogoni:" #define STR_ZIP_DRIVES "ZIP pogoni:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Ponovno pokretanje" IDS_2159 "ACPI bazirano gašenje" IDS_2160 "Postavke" + IDS_2161 "Raniji pogon" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/hu-HU.rc b/src/win/languages/hu-HU.rc index a35209d1f..bdf122d5e 100644 --- a/src/win/languages/hu-HU.rc +++ b/src/win/languages/hu-HU.rc @@ -182,7 +182,7 @@ BEGIN MENUITEM "Előző képfájl &újratöltése", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Meglévő képfájl &megnyitása...", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Mappa", IDM_CDROM_DIR END END @@ -277,8 +277,8 @@ END #define STR_VIDEO "Videokártya:" #define STR_VOODOO "Voodoo-gyorsítókártya" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "IBM 8514/a-gyorsítókártya" +#define STR_XGA "XGA-gyorsítókártya" #define STR_MOUSE "Egér:" #define STR_JOYSTICK "Játékvezérlő:" @@ -288,16 +288,16 @@ END #define STR_JOY4 "Játékvez. 4..." #define STR_SOUND "Hangkártya:" -#define STR_MIDI_OUT "MIDI-kimenet:" +#define STR_MIDI_OUT "MIDI-kimenet:" #define STR_MIDI_IN "MIDI-bemenet:" #define STR_MPU401 "Különálló MPU-401" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "FLOAT32 használata" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "FM szintetizátor meghajtó" +#define STR_FM_DRV_NUKED "Nuked (pontosabb)" +#define STR_FM_DRV_YMFM "YMFM (gyorsabb)" #define STR_NET_TYPE "Hálózati típusa:" #define STR_PCAP "PCap eszköz:" @@ -353,6 +353,7 @@ END #define STR_CHECKBPB "BPB ellenőrzés" #define STR_CDROM_DRIVES "CD-ROM meghajtók:" #define STR_CD_SPEED "Seb.:" +#define STR_EARLY "Korábbi meghajtó" #define STR_MO_DRIVES "MO-meghajtók:" #define STR_ZIP_DRIVES "ZIP-meghajtók:" @@ -520,6 +521,7 @@ BEGIN IDS_2158 "Hard reset" IDS_2159 "ACPI shutdown" IDS_2160 "Settings" + IDS_2161 "Korábbi meghajtó" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/it-IT.rc b/src/win/languages/it-IT.rc index fb3f36b66..ffcfe64d9 100644 --- a/src/win/languages/it-IT.rc +++ b/src/win/languages/it-IT.rc @@ -178,7 +178,7 @@ BEGIN MENUITEM "&Ricarica l'immagine precedente", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Immagine", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Cartella", IDM_CDROM_DIR END END @@ -273,8 +273,8 @@ END #define STR_VIDEO "Video:" #define STR_VOODOO "Grafica Voodoo" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "Grafica IBM 8514/a" +#define STR_XGA "Grafica XGA" #define STR_MOUSE "Mouse:" #define STR_JOYSTICK "Joystick:" @@ -284,16 +284,16 @@ END #define STR_JOY4 "Joystick 4..." #define STR_SOUND "Scheda audio:" -#define STR_MIDI_OUT "Uscita MIDI:" +#define STR_MIDI_OUT "Uscita MIDI:" #define STR_MIDI_IN "Entrata MIDI:" #define STR_MPU401 "MPU-401 autonomo" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Usa suono FLOAT32" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Driver sint. FM" +#define STR_FM_DRV_NUKED "Nuked (più accurato)" +#define STR_FM_DRV_YMFM "YMFM (più veloce)" #define STR_NET_TYPE "Tipo di rete:" #define STR_PCAP "Dispositivo PCap:" @@ -349,6 +349,7 @@ END #define STR_CHECKBPB "Verifica BPB" #define STR_CDROM_DRIVES "Unità CD-ROM:" #define STR_CD_SPEED "Veloc.:" +#define STR_EARLY "Unità anteriore" #define STR_MO_DRIVES "Unità magneto-ottiche:" #define STR_ZIP_DRIVES "Unità ZIP:" @@ -517,6 +518,7 @@ BEGIN IDS_2158 "Hard reset" IDS_2159 "ACPI shutdown" IDS_2160 "Settings" + IDS_2161 "Unità anteriore" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/ja-JP.rc b/src/win/languages/ja-JP.rc index f66055707..c1bd10e18 100644 --- a/src/win/languages/ja-JP.rc +++ b/src/win/languages/ja-JP.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "前のイメージを再読み込み(&R)", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "イメージ(&I)", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "フォルダ(&F)", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "ビデオカード:" #define STR_VOODOO "Voodooグラフィック" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "IBM 8514/aグラフィック" +#define STR_XGA "XGAグラフィック" #define STR_MOUSE "マウス:" #define STR_JOYSTICK "ジョイスティック:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "ジョイスティック4..." #define STR_SOUND "サウンドカード:" -#define STR_MIDI_OUT "MIDI出力デバイス:" +#define STR_MIDI_OUT "MIDI出力デバイス:" #define STR_MIDI_IN "MIDI入力デバイス:" #define STR_MPU401 "独立型MPU-401" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "FLOAT32サウンドを使用する" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "FMシンセドライバー" +#define STR_FM_DRV_NUKED "Nuked (高精度化)" +#define STR_FM_DRV_YMFM "YMFM (より速く)" #define STR_NET_TYPE "ネットワークタイプ:" #define STR_PCAP "PCapデバイス:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "BPBをチェック" #define STR_CDROM_DRIVES "CD-ROMドライブ:" #define STR_CD_SPEED "速度:" +#define STR_EARLY "アーリードライブ" #define STR_MO_DRIVES "光磁気ドライブ:" #define STR_ZIP_DRIVES "ZIPドライブ:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "ハードリセット" IDS_2159 "ACPIシャットダウン" IDS_2160 "設定" + IDS_2161 "アーリードライブ" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/ko-KR.rc b/src/win/languages/ko-KR.rc index 2cc4fdf7b..a43c9e3af 100644 --- a/src/win/languages/ko-KR.rc +++ b/src/win/languages/ko-KR.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "이전 이미지 다시 불러오기(&R)", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "이미지(&I)", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "폴더(&F)", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "비디오 카드:" #define STR_VOODOO "Voodoo 그래픽" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "IBM 8514/a 그래픽" +#define STR_XGA "XGA 그래픽" #define STR_MOUSE "마우스:" #define STR_JOYSTICK "조이스틱:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "조이스틱 4..." #define STR_SOUND "사운드 카드:" -#define STR_MIDI_OUT "MIDI 출력 장치:" +#define STR_MIDI_OUT "MIDI 출력 장치:" #define STR_MIDI_IN "MIDI 입력 장치:" #define STR_MPU401 "MPU-401 단독 사용" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "FLOAT32 사운드 사용" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "FM 신디사이저 드라이버" +#define STR_FM_DRV_NUKED "Nuked (더 정확한)" +#define STR_FM_DRV_YMFM "YMFM (더 빠르게)" #define STR_NET_TYPE "네트워크 종류:" #define STR_PCAP "PCap 장치:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "BPB 확인" #define STR_CDROM_DRIVES "CD-ROM 드라이브:" #define STR_CD_SPEED "속도:" +#define STR_EARLY "이전 드라이브" #define STR_MO_DRIVES "광자기 드라이브:" #define STR_ZIP_DRIVES "ZIP 드라이브:" @@ -507,15 +508,16 @@ BEGIN IDS_2149 "카세트 이미지 (*.PCM;*.RAW;*.WAV;*.CAS)\0*.PCM;*.RAW;*.WAV;*.CAS\0모든 파일 (*.*)\0*.*\0" IDS_2150 "카트리지 %i: %ls" IDS_2151 "카트리지 이미지 (*.A;*.B;*.JRC)\0*.A;*.B;*.JRC\0모든 파일 (*.*)\0*.*\0" - IDS_2152 "Error initializing renderer" - IDS_2153 "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer." - IDS_2154 "Resume execution" - IDS_2155 "Pause execution" - IDS_2156 "Press Ctrl+Alt+Del" - IDS_2157 "Press Ctrl+Alt+Esc" - IDS_2158 "Hard reset" - IDS_2159 "ACPI shutdown" - IDS_2160 "Settings" + IDS_2152 "렌더러 초기화 오류" + IDS_2153 "OpenGL (3.0 Core) 렌더러를 초기화할 수 없습니다. 다른 렌더러를 사용하십시오." + IDS_2154 "실행 재개" + IDS_2155 "실행 일시 중지" + IDS_2156 "Ctrl+Alt+Del" + IDS_2157 "Ctrl+Alt+Esc" + IDS_2158 "재시작" + IDS_2159 "ACPI 종료" + IDS_2160 "설정" + IDS_2161 "이전 드라이브" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/pl-PL.rc b/src/win/languages/pl-PL.rc index 9fb82438c..9218936b9 100644 --- a/src/win/languages/pl-PL.rc +++ b/src/win/languages/pl-PL.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Przeładuj poprzedni obraz", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Obraz", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Teczka", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Wideo:" #define STR_VOODOO "Grafika Voodoo" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "Grafika IBM 8514/a" +#define STR_XGA "Grafika XGA" #define STR_MOUSE "Mysz:" #define STR_JOYSTICK "Joystick:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "Joystick 4..." #define STR_SOUND "Karta dźwiękowa:" -#define STR_MIDI_OUT "Urządzenie wyjściowe MIDI:" +#define STR_MIDI_OUT "Urządzenie wyjściowe MIDI:" #define STR_MIDI_IN "Urządzenie wejściowe MIDI:" #define STR_MPU401 "Samodzielne urządzenie MPU-401" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Użyj dźwięku FLOAT32" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Sterownik syntezy FM" +#define STR_FM_DRV_NUKED "Nuked (dokładniejszy)" +#define STR_FM_DRV_YMFM "YMFM (szybszy)" #define STR_NET_TYPE "Rodzaj sieci:" #define STR_PCAP "Urządzenie PCap:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Sprawdzaj BPB" #define STR_CDROM_DRIVES "Napędy CD-ROM:" #define STR_CD_SPEED "Szybkość:" +#define STR_EARLY "Wcześniejszy napęd" #define STR_MO_DRIVES "Napędy MO:" #define STR_ZIP_DRIVES "Napędy ZIP:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Twardy reset" IDS_2159 "Wyłączenie ACPI" IDS_2160 "Ustawienia" + IDS_2161 "Wcześniejszy napęd" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/pt-BR.rc b/src/win/languages/pt-BR.rc index 3a5af87f8..9c5f65a56 100644 --- a/src/win/languages/pt-BR.rc +++ b/src/win/languages/pt-BR.rc @@ -286,16 +286,16 @@ END #define STR_JOY4 "Joystick 4..." #define STR_SOUND "Placa de som:" -#define STR_MIDI_OUT "Disp. saída MIDI:" +#define STR_MIDI_OUT "Disp. saída MIDI:" #define STR_MIDI_IN "Disp. entrada MIDI:" #define STR_MPU401 "MPU-401 autônomo" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Usar som FLOAT32" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Controlador de sint. FM" +#define STR_FM_DRV_NUKED "Nuked (mais preciso)" +#define STR_FM_DRV_YMFM "YMFM (mais rápido)" #define STR_NET_TYPE "Tipo de rede:" #define STR_PCAP "Dispositivo PCap:" @@ -351,6 +351,7 @@ END #define STR_CHECKBPB "Verificar BPB" #define STR_CDROM_DRIVES "Unidades de CD-ROM:" #define STR_CD_SPEED "Veloc.:" +#define STR_EARLY "Unidade anterior" #define STR_MO_DRIVES "Unidades magneto-ópticas:" #define STR_ZIP_DRIVES "Unidades ZIP:" @@ -519,6 +520,7 @@ BEGIN IDS_2158 "Reinicialização completa" IDS_2159 "Desligamento por ACPI" IDS_2160 "Configurações" + IDS_2161 "Unidade anterior" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/pt-PT.rc b/src/win/languages/pt-PT.rc index 81b27665e..55b81c8d3 100644 --- a/src/win/languages/pt-PT.rc +++ b/src/win/languages/pt-PT.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Recarregar imagem anterior", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Imagem", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Pasta", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Vídeo:" #define STR_VOODOO "Gráficos Voodoo" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "Gráficos IBM 8514/a" +#define STR_XGA "Gráficos XGA" #define STR_MOUSE "Rato:" #define STR_JOYSTICK "Joystick:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "Joystick 4..." #define STR_SOUND "Placa de som:" -#define STR_MIDI_OUT "Disp. saída MIDI:" +#define STR_MIDI_OUT "Disp. saída MIDI:" #define STR_MIDI_IN "Disp. entrada MIDI:" #define STR_MPU401 "MPU-401 autónomo" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Utilizar som FLOAT32" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Controlador de sint. FM" +#define STR_FM_DRV_NUKED "Nuked (mais exacto)" +#define STR_FM_DRV_YMFM "YMFM (mais rápido)" #define STR_NET_TYPE "Tipo de rede:" #define STR_PCAP "Dispositivo PCap:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Verificar BPB" #define STR_CDROM_DRIVES "Unidades CD-ROM:" #define STR_CD_SPEED "Velocidade:" +#define STR_EARLY "Unidade anterior" #define STR_MO_DRIVES "Unidades magneto-ópticas:" #define STR_ZIP_DRIVES "Unidades ZIP:" @@ -507,15 +508,16 @@ BEGIN IDS_2149 "Imagens de cassete (*.PCM;*.RAW;*.WAV;*.CAS)\0*.PCM;*.RAW;*.WAV;*.CAS\0Todos os ficheiros (*.*)\0*.*\0" IDS_2150 "Cartucho %i: %ls" IDS_2151 "Imagens de cartucho (*.A;*.B;*.JRC)\0*.A;*.B;*.JRC\0Todos os ficheiros (*.*)\0*.*\0" - IDS_2152 "Error initializing renderer" - IDS_2153 "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer." - IDS_2154 "Resume execution" - IDS_2155 "Pause execution" - IDS_2156 "Press Ctrl+Alt+Del" - IDS_2157 "Press Ctrl+Alt+Esc" - IDS_2158 "Hard reset" - IDS_2159 "ACPI shutdown" - IDS_2160 "Settings" + IDS_2152 "Erro na inicialização do renderizador" + IDS_2153 "Não foi possível inicializar o renderizador OpenGL (3.0 Core). Utilize outro renderizador." + IDS_2154 "Retomar execução" + IDS_2155 "Pausar execução" + IDS_2156 "Ctrl+Alt+Del" + IDS_2157 "Ctrl+Alt+Esc" + IDS_2158 "Reinicialização completa" + IDS_2159 "Encerramento ACPI" + IDS_2160 "Definições" + IDS_2161 "Unidade anterior" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/ru-RU.rc b/src/win/languages/ru-RU.rc index 868f9c4b3..95b550dce 100644 --- a/src/win/languages/ru-RU.rc +++ b/src/win/languages/ru-RU.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Снова загрузить предыдущий образ", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Образ...", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Папка", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Видеокарта:" #define STR_VOODOO "Ускоритель Voodoo" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "Ускоритель IBM 8514/a" +#define STR_XGA "Ускоритель XGA" #define STR_MOUSE "Мышь:" #define STR_JOYSTICK "Джойстик:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "Джойстик 4..." #define STR_SOUND "Звуковая карта:" -#define STR_MIDI_OUT "MIDI Out устр-во:" +#define STR_MIDI_OUT "MIDI Out устр-во:" #define STR_MIDI_IN "MIDI In устр-во:" #define STR_MPU401 "Отдельный MPU-401" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "FLOAT32 звук" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Драйвер FM-синтезатора" +#define STR_FM_DRV_NUKED "Nuked (более точный)" +#define STR_FM_DRV_YMFM "YMFM (быстрей)" #define STR_NET_TYPE "Тип сети:" #define STR_PCAP "Устройство PCap:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Проверять BPB" #define STR_CDROM_DRIVES "Дисководы CD-ROM:" #define STR_CD_SPEED "Скорость:" +#define STR_EARLY "Предыдущий дисковод" #define STR_MO_DRIVES "Магнитооптические дисководы:" #define STR_ZIP_DRIVES "ZIP дисководы:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Холодная перезагрузка" IDS_2159 "Сигнал завершения ACPI" IDS_2160 "Настройки машины" + IDS_2161 "Предыдущий дисковод" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/sl-SI.rc b/src/win/languages/sl-SI.rc index b6713d3da..7b957cf0d 100644 --- a/src/win/languages/sl-SI.rc +++ b/src/win/languages/sl-SI.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Naloži zadnjo sliko", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Slika", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Mapa", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Video:" #define STR_VOODOO "Voodoo grafika" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "IBM 8514/a grafika" +#define STR_XGA "XGA grafika" #define STR_MOUSE "Miška:" #define STR_JOYSTICK "Igralna palica:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "Igralna palica 4..." #define STR_SOUND "Zvočna kartica:" -#define STR_MIDI_OUT "Izhodna naprava MIDI:" +#define STR_MIDI_OUT "Izhodna naprava MIDI:" #define STR_MIDI_IN "Vhodna naprava MIDI:" #define STR_MPU401 "Samostojen MPU-401" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "Uporabi FLOAT32 za zvok" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Gonilnik sintetizacije FM" +#define STR_FM_DRV_NUKED "Nuked (točnejši)" +#define STR_FM_DRV_YMFM "YMFM (hitrejši)" #define STR_NET_TYPE "Vrsta omrežja:" #define STR_PCAP "Naprava PCap:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Preverjaj BPB" #define STR_CDROM_DRIVES "Pogoni CD-ROM:" #define STR_CD_SPEED "Hitrost:" +#define STR_EARLY "Zgodnejši pogon" #define STR_MO_DRIVES "Magnetno-optični pogoni:" #define STR_ZIP_DRIVES "Pogoni ZIP:" @@ -507,15 +508,16 @@ BEGIN IDS_2149 "Slike kaset (*.PCM;*.RAW;*.WAV;*.CAS)\0*.PCM;*.RAW;*.WAV;*.CAS\0Vse datoteke (*.*)\0*.*\0" IDS_2150 "Spominski vložek %i: %ls" IDS_2151 "Slike spominskega vložka (*.A;*.B;*.JRC)\0*.A;*.B;*.JRC\0Vse datoteke (*.*)\0*.*\0" - IDS_2152 "Error initializing renderer" - IDS_2153 "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer." - IDS_2154 "Resume execution" - IDS_2155 "Pause execution" + IDS_2152 "Napaka pri zagonu sistema za upodabljanje" + IDS_2153 "Sistema za upodabljanje OpenGL (3.0 Core) ni bilo mogoče zagnati. Uporabite drug sistem za upodabljanje." + IDS_2154 "Nadaljuj izvajanje" + IDS_2155 "Prekini izvajanje" IDS_2156 "Press Ctrl+Alt+Del" IDS_2157 "Press Ctrl+Alt+Esc" - IDS_2158 "Hard reset" - IDS_2159 "ACPI shutdown" - IDS_2160 "Settings" + IDS_2158 "Ponovni zagon" + IDS_2159 "Zaustavitev ACPI" + IDS_2160 "Nastavitve" + IDS_2161 "Zgodnejši pogon" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/tr-TR.rc b/src/win/languages/tr-TR.rc index 2317d5a6e..4578dc771 100644 --- a/src/win/languages/tr-TR.rc +++ b/src/win/languages/tr-TR.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Önceki imajı seç", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&İmaj seç", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Klasör", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Ekran kartı:" #define STR_VOODOO "Voodoo Grafikleri" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "IBM 8514/a Grafikleri" +#define STR_XGA "XGA Grafikleri" #define STR_MOUSE "Fare:" #define STR_JOYSTICK "Oyun kolu:" @@ -283,16 +283,16 @@ END #define STR_JOY4 "Oyun kolu 4..." #define STR_SOUND "Ses kartı:" -#define STR_MIDI_OUT "MIDI Çıkış Cihazı:" +#define STR_MIDI_OUT "MIDI Çıkış Cihazı:" #define STR_MIDI_IN "MIDI Giriş Cihazı:" #define STR_MPU401 "Bağımsız MPU-401" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "FLOAT32 ses kullan" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "FM sentez sürücüsü" +#define STR_FM_DRV_NUKED "Nuked (daha doğru)" +#define STR_FM_DRV_YMFM "YMFM (daha hızlı)" #define STR_NET_TYPE "Ağ tipi:" #define STR_PCAP "PCap cihazı:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "BPB'yi denetle" #define STR_CDROM_DRIVES "CD-ROM sürücüleri:" #define STR_CD_SPEED "Hız:" +#define STR_EARLY "Daha erken sürüş" #define STR_MO_DRIVES "MO sürücüleri:" #define STR_ZIP_DRIVES "ZIP sürücüleri:" @@ -507,15 +508,16 @@ BEGIN IDS_2149 "Kaset imajları (*.PCM;*.RAW;*.WAV;*.CAS)\0*.PCM;*.RAW;*.WAV;*.CAS\0Tüm dosyalar (*.*)\0*.*\0" IDS_2150 "Kartuş %i: %ls" IDS_2151 "Kartuş imajları (*.A;*.B;*.JRC)\0*.A;*.B;*.JRC\0Tüm dosyalar (*.*)\0*.*\0" - IDS_2152 "Error initializing renderer" - IDS_2153 "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer." - IDS_2154 "Resume execution" - IDS_2155 "Pause execution" - IDS_2156 "Press Ctrl+Alt+Del" - IDS_2157 "Press Ctrl+Alt+Esc" - IDS_2158 "Hard reset" - IDS_2159 "ACPI shutdown" - IDS_2160 "Settings" + IDS_2152 "Oluşturucu başlatılırken hata oluştu" + IDS_2153 "OpenGL (3.0 Core) görüntüleyici başlatılamadı. Başka bir görüntüleyici kullanın." + IDS_2154 "Yürütmeye devam et" + IDS_2155 "Yürütmeyi duraklat" + IDS_2156 "Ctrl+Alt+Del" + IDS_2157 "Ctrl+Alt+Esc" + IDS_2158 "Makineyi yeniden başlat" + IDS_2159 "ACPI kapatma" + IDS_2160 "Ayarlar" + IDS_2161 "Daha erken sürüş" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/uk-UA.rc b/src/win/languages/uk-UA.rc index dd4171611..3b20ba1ee 100644 --- a/src/win/languages/uk-UA.rc +++ b/src/win/languages/uk-UA.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "&Знову завантажити попередній образ", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "&Образ...", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "&Тека", IDM_CDROM_DIR END END @@ -272,8 +272,8 @@ END #define STR_VIDEO "Відеокарта:" #define STR_VOODOO "Прискорювач Voodoo" -#define STR_IBM8514 "IBM 8514/a Graphics" -#define STR_XGA "XGA Graphics" +#define STR_IBM8514 "Прискорювач IBM 8514/a" +#define STR_XGA "Прискорювач XGA" #define STR_MOUSE "Миша:" #define STR_JOYSTICK "Джойстик:" @@ -290,9 +290,9 @@ END #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "FLOAT32 звук" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "Драйвер FM-синтезатора" +#define STR_FM_DRV_NUKED "Nuked (більш точний)" +#define STR_FM_DRV_YMFM "YMFM (швидший)" #define STR_NET_TYPE "Тип мережі:" #define STR_PCAP "Пристрій PCap:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "Перевіряти BPB" #define STR_CDROM_DRIVES "Дисководи CD-ROM:" #define STR_CD_SPEED "Швидкість:" +#define STR_EARLY "Більш ранній дисковод" #define STR_MO_DRIVES "Магнітооптичні дисководи:" #define STR_ZIP_DRIVES "ZIP дисководи:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "Холодне перезавантаження" IDS_2159 "Сигнал завершення ACPI" IDS_2160 "Налаштування машини" + IDS_2161 "Більш ранній дисковод" END STRINGTABLE DISCARDABLE diff --git a/src/win/languages/zh-CN.rc b/src/win/languages/zh-CN.rc index d2566ac15..6a1a2a55a 100644 --- a/src/win/languages/zh-CN.rc +++ b/src/win/languages/zh-CN.rc @@ -177,7 +177,7 @@ BEGIN MENUITEM "载入上一个镜像(&R)", IDM_CDROM_RELOAD MENUITEM SEPARATOR MENUITEM "镜像(&I)", IDM_CDROM_IMAGE - MENUITEM "&Folder", IDM_CDROM_DIR + MENUITEM "文件夹(&F)", IDM_CDROM_DIR END END @@ -283,16 +283,16 @@ END #define STR_JOY4 "操纵杆 4..." #define STR_SOUND "声卡:" -#define STR_MIDI_OUT "MIDI 输出设备:" +#define STR_MIDI_OUT "MIDI 输出设备:" #define STR_MIDI_IN "MIDI 输入设备:" #define STR_MPU401 "独立 MPU-401" #define STR_SSI "Innovation SSI-2001" #define STR_CMS "CMS / Game Blaster" #define STR_GUS "Gravis Ultrasound" #define STR_FLOAT "使用单精度浮点 (FLOAT32)" -#define STR_FM_DRIVER "FM synth driver" -#define STR_FM_DRV_NUKED "Nuked (more accurate)" -#define STR_FM_DRV_YMFM "YMFM (faster)" +#define STR_FM_DRIVER "调频合成器驱动器" +#define STR_FM_DRV_NUKED "Nuked (更准确)" +#define STR_FM_DRV_YMFM "YMFM (更快)" #define STR_NET_TYPE "网络类型:" #define STR_PCAP "PCap 设备:" @@ -348,6 +348,7 @@ END #define STR_CHECKBPB "检查 BPB" #define STR_CDROM_DRIVES "光盘驱动器:" #define STR_CD_SPEED "速度:" +#define STR_EARLY "早先的驱动器" #define STR_MO_DRIVES "磁光盘驱动器:" #define STR_ZIP_DRIVES "ZIP 驱动器:" @@ -516,6 +517,7 @@ BEGIN IDS_2158 "硬重置" IDS_2159 "ACPI 关机" IDS_2160 "设置" + IDS_2161 "早先的驱动器" END STRINGTABLE DISCARDABLE diff --git a/src/win/win_settings.c b/src/win/win_settings.c index a1c83ca52..724222bb0 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -3635,6 +3635,14 @@ win_settings_cdrom_drives_recalc_list(HWND hdlg) lvI.iItem = i; lvI.iImage = 0; + if (ListView_SetItem(hwndList, &lvI) == -1) + return FALSE; + + lvI.iSubItem = 2; + lvI.pszText = plat_get_string(temp_cdrom[i].early ? IDS_2060 : IDS_2061); + lvI.iItem = i; + lvI.iImage = 0; + if (ListView_SetItem(hwndList, &lvI) == -1) return FALSE; } @@ -3815,15 +3823,19 @@ win_settings_floppy_drives_init_columns(HWND hdlg) static void win_settings_cdrom_drives_resize_columns(HWND hdlg) { - int width[2] = { 292, 147 }; + int iCol, width[3] = { 292, 58, 89 }; + int total = 0; HWND hwndList = GetDlgItem(hdlg, IDC_LIST_CDROM_DRIVES); RECT r; GetWindowRect(hwndList, &r); - width[0] = MulDiv(width[0], dpi, 96); - ListView_SetColumnWidth(hwndList, 0, MulDiv(width[0], dpi, 96)); - width[1] = (r.right - r.left) - 4 - width[0]; - ListView_SetColumnWidth(hwndList, 1, width[1]); + for (iCol = 0; iCol < 2; iCol++) { + width[iCol] = MulDiv(width[iCol], dpi, 96); + total += width[iCol]; + ListView_SetColumnWidth(hwndList, iCol, MulDiv(width[iCol], dpi, 96)); + } + width[2] = (r.right - r.left) - 4 - total; + ListView_SetColumnWidth(hwndList, 2, width[2]); } static BOOL @@ -3846,12 +3858,21 @@ win_settings_cdrom_drives_init_columns(HWND hdlg) lvc.iSubItem = 1; lvc.pszText = plat_get_string(IDS_2053); - lvc.cx = 147; + lvc.cx = 58; lvc.fmt = LVCFMT_LEFT; if (ListView_InsertColumn(hwndList, 1, &lvc) == -1) return FALSE; + lvc.iSubItem = 2; + lvc.pszText = plat_get_string(IDS_2161); + + lvc.cx = 89; + lvc.fmt = LVCFMT_LEFT; + + if (ListView_InsertColumn(hwndList, 2, &lvc) == -1) + return FALSE; + win_settings_cdrom_drives_resize_columns(hdlg); return TRUE; } @@ -4051,6 +4072,14 @@ win_settings_cdrom_drives_update_item(HWND hdlg, int i) lvI.iItem = i; lvI.iImage = 0; + if (ListView_SetItem(hwndList, &lvI) == -1) + return; + + lvI.iSubItem = 2; + lvI.pszText = plat_get_string(temp_cdrom[i].early ? IDS_2060 : IDS_2061); + lvI.iItem = i; + lvI.iImage = 0; + if (ListView_SetItem(hwndList, &lvI) == -1) return; } @@ -4196,19 +4225,22 @@ cdrom_recalc_location_controls(HWND hdlg, int assign_id) int i = 0; int bus = temp_cdrom[lv2_current_sel].bus_type; - for (i = IDT_CD_ID; i <= (IDT_CD_LUN); i++) + for (i = IDT_CD_ID; i <= IDT_CD_CHANNEL; i++) settings_show_window(hdlg, i, FALSE); settings_show_window(hdlg, IDC_COMBO_CD_ID, FALSE); settings_show_window(hdlg, IDC_COMBO_CD_CHANNEL_IDE, FALSE); settings_show_window(hdlg, IDC_COMBO_CD_SPEED, bus != CDROM_BUS_DISABLED); settings_show_window(hdlg, IDT_CD_SPEED, bus != CDROM_BUS_DISABLED); + settings_show_window(hdlg, IDC_CHECKEARLY, bus != CDROM_BUS_DISABLED); - if (bus != CDROM_BUS_DISABLED) + if (bus != CDROM_BUS_DISABLED) { settings_set_cur_sel(hdlg, IDC_COMBO_CD_SPEED, temp_cdrom[lv2_current_sel].speed - 1); + settings_set_check(hdlg, IDC_CHECKEARLY, temp_cdrom[lv2_current_sel].early); + } switch (bus) { case CDROM_BUS_ATAPI: /* ATAPI */ - settings_show_window(hdlg, IDT_CD_LUN, TRUE); + settings_show_window(hdlg, IDT_CD_CHANNEL, TRUE); settings_show_window(hdlg, IDC_COMBO_CD_CHANNEL_IDE, TRUE); if (assign_id) @@ -4593,6 +4625,12 @@ win_settings_floppy_and_cdrom_drives_proc(HWND hdlg, UINT message, WPARAM wParam temp_cdrom[lv2_current_sel].speed = settings_get_cur_sel(hdlg, IDC_COMBO_CD_SPEED) + 1; win_settings_cdrom_drives_update_item(hdlg, lv2_current_sel); break; + + case IDC_CHECKEARLY: + temp_cdrom[lv2_current_sel].early = settings_get_check(hdlg, IDC_CHECKEARLY); + win_settings_cdrom_drives_update_item(hdlg, lv2_current_sel); + break; + } ignore_change = 0; From 962fca2b92e1bf4525e5dcc726399c54b7c22c1b Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 29 Oct 2022 12:20:24 +0600 Subject: [PATCH 05/60] qt: Add earlier drive checkbox in CD-ROM settings --- src/qt/qt_settingsfloppycdrom.cpp | 23 +++++++++++++++++++++-- src/qt/qt_settingsfloppycdrom.hpp | 2 ++ src/qt/qt_settingsfloppycdrom.ui | 7 +++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_settingsfloppycdrom.cpp b/src/qt/qt_settingsfloppycdrom.cpp index 6bf9859ce..32943f9a6 100644 --- a/src/qt/qt_settingsfloppycdrom.cpp +++ b/src/qt/qt_settingsfloppycdrom.cpp @@ -73,6 +73,12 @@ static void setCDROMSpeed(QAbstractItemModel* model, const QModelIndex& idx, uin model->setData(i, speed, Qt::UserRole); } +static void setCDROMEarly(QAbstractItemModel* model, const QModelIndex& idx, bool early) { + auto i = idx.siblingAtColumn(2); + model->setData(i, (early == true) ? QObject::tr("On") : QObject::tr("Off")); + model->setData(i, early, Qt::UserRole); +} + SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent) : QWidget(parent), ui(new Ui::SettingsFloppyCDROM) @@ -120,15 +126,17 @@ SettingsFloppyCDROM::SettingsFloppyCDROM(QWidget *parent) : Models::AddEntry(model, QString("%1x").arg(i + 1), i + 1); } - model = new QStandardItemModel(0, 2, this); + model = new QStandardItemModel(0, 3, this); ui->tableViewCDROM->setModel(model); model->setHeaderData(0, Qt::Horizontal, tr("Bus")); model->setHeaderData(1, Qt::Horizontal, tr("Speed")); + model->setHeaderData(2, Qt::Horizontal, tr("Earlier drive")); model->insertRows(0, CDROM_NUM); for (int i = 0; i < CDROM_NUM; i++) { auto idx = model->index(i, 0); setCDROMBus(model, idx, cdrom[i].bus_type, cdrom[i].res); setCDROMSpeed(model, idx.siblingAtColumn(1), cdrom[i].speed); + setCDROMEarly(model, idx.siblingAtColumn(2), cdrom[i].early); Harddrives::busTrackClass->device_track(1, DEV_CDROM, cdrom[i].bus_type, cdrom[i].bus_type == CDROM_BUS_ATAPI ? cdrom[i].ide_channel : cdrom[i].scsi_device_id); } ui->tableViewCDROM->resizeColumnsToContents(); @@ -154,7 +162,7 @@ void SettingsFloppyCDROM::save() { /* Removable devices category */ model = ui->tableViewCDROM->model(); for (int i = 0; i < CDROM_NUM; i++) { - cdrom[i].is_dir = 0; + cdrom[i].is_dir = 0; cdrom[i].priv = NULL; cdrom[i].ops = NULL; cdrom[i].image = NULL; @@ -165,6 +173,7 @@ void SettingsFloppyCDROM::save() { cdrom[i].bus_type = model->index(i, 0).data(Qt::UserRole).toUInt(); cdrom[i].res = model->index(i, 0).data(Qt::UserRole + 1).toUInt(); cdrom[i].speed = model->index(i, 1).data(Qt::UserRole).toUInt(); + cdrom[i].early = model->index(i, 2).data(Qt::UserRole).toUInt(); } } @@ -179,6 +188,7 @@ void SettingsFloppyCDROM::onCDROMRowChanged(const QModelIndex ¤t) { uint8_t bus = current.siblingAtColumn(0).data(Qt::UserRole).toUInt(); uint8_t channel = current.siblingAtColumn(0).data(Qt::UserRole + 1).toUInt(); uint8_t speed = current.siblingAtColumn(1).data(Qt::UserRole).toUInt(); + bool early = current.siblingAtColumn(2).data(Qt::UserRole).toBool(); ui->comboBoxBus->setCurrentIndex(-1); auto* model = ui->comboBoxBus->model(); @@ -194,6 +204,7 @@ void SettingsFloppyCDROM::onCDROMRowChanged(const QModelIndex ¤t) { } ui->comboBoxSpeed->setCurrentIndex(speed == 0 ? 7 : speed - 1); + ui->checkBoxEarlierDrive->setChecked(early); } void SettingsFloppyCDROM::on_checkBoxTurboTimings_stateChanged(int arg1) { @@ -219,6 +230,7 @@ void SettingsFloppyCDROM::on_comboBoxBus_currentIndexChanged(int index) { bool enabled = (bus != CDROM_BUS_DISABLED); ui->comboBoxChannel->setEnabled(enabled); ui->comboBoxSpeed->setEnabled(enabled); + ui->checkBoxEarlierDrive->setEnabled(enabled); Harddrives::populateBusChannels(ui->comboBoxChannel->model(), bus); } @@ -251,3 +263,10 @@ void SettingsFloppyCDROM::on_comboBoxChannel_activated(int) { ui->comboBoxChannel->currentData().toUInt()); Harddrives::busTrackClass->device_track(1, DEV_CDROM, ui->tableViewCDROM->model()->data(i, Qt::UserRole).toInt(), ui->tableViewCDROM->model()->data(i, Qt::UserRole + 1).toInt()); } + +void SettingsFloppyCDROM::on_checkBoxEarlierDrive_stateChanged(int arg1) +{ + auto idx = ui->tableViewCDROM->selectionModel()->currentIndex(); + setCDROMEarly(ui->tableViewCDROM->model(), idx.siblingAtColumn(2), (arg1 == Qt::Checked) ? true : false); +} + diff --git a/src/qt/qt_settingsfloppycdrom.hpp b/src/qt/qt_settingsfloppycdrom.hpp index f68646ab0..4f50031cf 100644 --- a/src/qt/qt_settingsfloppycdrom.hpp +++ b/src/qt/qt_settingsfloppycdrom.hpp @@ -28,6 +28,8 @@ private slots: void onFloppyRowChanged(const QModelIndex ¤t); void onCDROMRowChanged(const QModelIndex ¤t); + void on_checkBoxEarlierDrive_stateChanged(int arg1); + private: Ui::SettingsFloppyCDROM *ui; }; diff --git a/src/qt/qt_settingsfloppycdrom.ui b/src/qt/qt_settingsfloppycdrom.ui index 8f7ffa995..6233e9e7b 100644 --- a/src/qt/qt_settingsfloppycdrom.ui +++ b/src/qt/qt_settingsfloppycdrom.ui @@ -145,6 +145,13 @@ + + + + Earlier drive + + + From e4a4549e3f99d329c2c216e5e4fee5fd42045299 Mon Sep 17 00:00:00 2001 From: cold-brewed Date: Sat, 29 Oct 2022 09:09:30 -0400 Subject: [PATCH 06/60] qt: Rework ui pause update into a slot for thread safety --- src/qt/qt_mainwindow.cpp | 6 +++--- src/qt/qt_mainwindow.hpp | 2 +- src/qt/qt_platform.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index e97864a3a..c6206de96 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -2052,9 +2052,9 @@ void MainWindow::setSendKeyboardInput(bool enabled) send_keyboard_input = enabled; } -void MainWindow::setUiPauseState(bool paused) { - auto pause_icon = paused ? QIcon(":/menuicons/win/icons/run.ico") : QIcon(":/menuicons/win/icons/pause.ico"); - auto tooltip_text = paused ? QString(tr("Resume execution")) : QString(tr("Pause execution")); +void MainWindow::updateUiPauseState() { + auto pause_icon = dopause ? QIcon(":/menuicons/win/icons/run.ico") : QIcon(":/menuicons/win/icons/pause.ico"); + auto tooltip_text = dopause ? QString(tr("Resume execution")) : QString(tr("Pause execution")); ui->actionPause->setIcon(pause_icon); ui->actionPause->setToolTip(tooltip_text); } diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index a91fd1f57..ef70a0826 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -33,7 +33,6 @@ public: void blitToWidget(int x, int y, int w, int h, int monitor_index); QSize getRenderWidgetSize(); void setSendKeyboardInput(bool enabled); - void setUiPauseState(bool paused); std::array, 8> renderers; signals: @@ -65,6 +64,7 @@ public slots: void togglePause(); void initRendererMonitorSlot(int monitor_index); void destroyRendererMonitorSlot(int monitor_index); + void updateUiPauseState(); private slots: void on_actionFullscreen_triggered(); void on_actionSettings_triggered(); diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 4163b0ce5..bcf51d70d 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -366,7 +366,7 @@ plat_pause(int p) ui_window_title(oldtitle); } discord_update_activity(dopause); - main_window->setUiPauseState(p); + QTimer::singleShot(0, main_window, &MainWindow::updateUiPauseState); #ifdef Q_OS_WINDOWS if (source_hwnd) From 47f62572404c9437d71dbb7a16fe3128dce71645 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 29 Oct 2022 10:52:49 -0400 Subject: [PATCH 07/60] Correct headers for BSD Licensed files --- src/device/isamem.c | 10 ++++------ src/device/isartc.c | 10 ++++------ src/disk/hdc_xta.c | 10 ++++------ src/floppy/fdc_pii15xb.c | 10 ++++------ src/floppy/fdd_json.c | 10 ++++------ src/include/86box/fdd_json.h | 10 ++++------ src/include/86box/isamem.h | 10 ++++------ src/include/86box/isartc.h | 10 ++++------ src/include/86box/network.h | 10 ++++------ src/include/86box/nvr.h | 10 ++++------ src/include/86box/png_struct.h | 10 ++++------ src/include/86box/printer.h | 10 ++++------ src/machine/m_ps1_hdc.c | 10 ++++------ src/network/net_pcap.c | 10 ++++------ src/network/network.c | 10 ++++------ src/network/pcap_if.c | 10 ++++------ src/nvr.c | 10 ++++------ src/printer/png.c | 10 ++++------ src/printer/prt_cpmap.c | 10 ++++------ src/printer/prt_escp.c | 10 ++++------ src/printer/prt_text.c | 10 ++++------ 21 files changed, 84 insertions(+), 126 deletions(-) diff --git a/src/device/isamem.c b/src/device/isamem.c index 00e8bd8e7..839f37f92 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implementation of a memory expansion board for the ISA Bus. * diff --git a/src/device/isartc.c b/src/device/isartc.c index 029a5067d..66accb66a 100644 --- a/src/device/isartc.c +++ b/src/device/isartc.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implementation of a Clock/RTC Card for the ISA PC/XT. * diff --git a/src/disk/hdc_xta.c b/src/disk/hdc_xta.c index 4b98551a1..c6abf9adf 100644 --- a/src/disk/hdc_xta.c +++ b/src/disk/hdc_xta.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implementation of a generic IDE-XTA disk controller. * diff --git a/src/floppy/fdc_pii15xb.c b/src/floppy/fdc_pii15xb.c index e0cfb58cd..d8b687502 100644 --- a/src/floppy/fdc_pii15xb.c +++ b/src/floppy/fdc_pii15xb.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implementation of the DTK MiniMicro series of Floppy Disk Controllers. * Original code from VARCem. Fully rewritten, fixed and improved for 86Box. diff --git a/src/floppy/fdd_json.c b/src/floppy/fdd_json.c index 104f49448..aba7f1d33 100644 --- a/src/floppy/fdd_json.c +++ b/src/floppy/fdd_json.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implementation of the PCjs JSON floppy image format. * diff --git a/src/include/86box/fdd_json.h b/src/include/86box/fdd_json.h index 99b12f816..e86aad01a 100644 --- a/src/include/86box/fdd_json.h +++ b/src/include/86box/fdd_json.h @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Definitions for the PCjs JSON floppy image format. * diff --git a/src/include/86box/isamem.h b/src/include/86box/isamem.h index 3603d368f..9a1841c53 100644 --- a/src/include/86box/isamem.h +++ b/src/include/86box/isamem.h @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Definitions for the ISAMEM cards. * diff --git a/src/include/86box/isartc.h b/src/include/86box/isartc.h index 1df787f67..d619d3052 100644 --- a/src/include/86box/isartc.h +++ b/src/include/86box/isartc.h @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Definitions for the ISARTC cards. * diff --git a/src/include/86box/network.h b/src/include/86box/network.h index 77bfa37a4..292c863fa 100644 --- a/src/include/86box/network.h +++ b/src/include/86box/network.h @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Definitions for the network module. * diff --git a/src/include/86box/nvr.h b/src/include/86box/nvr.h index a4bf93056..97c8786c3 100644 --- a/src/include/86box/nvr.h +++ b/src/include/86box/nvr.h @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Definitions for the generic NVRAM/CMOS driver. * diff --git a/src/include/86box/png_struct.h b/src/include/86box/png_struct.h index 8bc77c455..cbbcc5be8 100644 --- a/src/include/86box/png_struct.h +++ b/src/include/86box/png_struct.h @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Definitions for the centralized PNG image handler. * diff --git a/src/include/86box/printer.h b/src/include/86box/printer.h index c8d300283..eb6eb4a75 100644 --- a/src/include/86box/printer.h +++ b/src/include/86box/printer.h @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Definitions for the printers module. * diff --git a/src/machine/m_ps1_hdc.c b/src/machine/m_ps1_hdc.c index 6ac39d1e6..4355a0ad6 100644 --- a/src/machine/m_ps1_hdc.c +++ b/src/machine/m_ps1_hdc.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implementation of the PS/1 Model 2011 disk controller. * diff --git a/src/network/net_pcap.c b/src/network/net_pcap.c index 31fba2f52..8c9326ec3 100644 --- a/src/network/net_pcap.c +++ b/src/network/net_pcap.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Handle WinPcap library processing. * diff --git a/src/network/network.c b/src/network/network.c index 570f8e039..9b4c9e4b9 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implementation of the network module. * diff --git a/src/network/pcap_if.c b/src/network/pcap_if.c index cca012cff..53eb6804a 100644 --- a/src/network/pcap_if.c +++ b/src/network/pcap_if.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Simple program to show usage of (Win)Pcap. * diff --git a/src/nvr.c b/src/nvr.c index 5d6a272ff..dccc6be40 100644 --- a/src/nvr.c +++ b/src/nvr.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implement a generic NVRAM/CMOS/RTC device. * diff --git a/src/printer/png.c b/src/printer/png.c index 991e3c475..56e2ccfc7 100644 --- a/src/printer/png.c +++ b/src/printer/png.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Provide centralized access to the PNG image handler. * diff --git a/src/printer/prt_cpmap.c b/src/printer/prt_cpmap.c index 32eebcfdd..ba9e71085 100644 --- a/src/printer/prt_cpmap.c +++ b/src/printer/prt_cpmap.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Various ASCII to Unicode maps, for the various codepages. * diff --git a/src/printer/prt_escp.c b/src/printer/prt_escp.c index 5c74431b7..96d9bf86b 100644 --- a/src/printer/prt_escp.c +++ b/src/printer/prt_escp.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implementation of the Generic ESC/P Dot-Matrix printer. * diff --git a/src/printer/prt_text.c b/src/printer/prt_text.c index 6bf25ac06..b67d859b9 100644 --- a/src/printer/prt_text.c +++ b/src/printer/prt_text.c @@ -1,10 +1,8 @@ /* - * 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 - * system designs based on the PCI bus. - * - * This file is part of the 86Box distribution. + * VARCem Virtual ARchaeological Computer EMulator. + * An emulator of (mostly) x86-based PC systems and devices, + * using the ISA,EISA,VLB,MCA and PCI system buses, roughly + * spanning the era between 1981 and 1995. * * Implementation of a generic text printer. * From 676a41d9d5693d51214ee7615644bb7e745f4809 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Oct 2022 17:58:53 +0200 Subject: [PATCH 08/60] Fixed interrupt DRQ on CD-ROM - should fix the Windows 95 Protection Errors. --- src/scsi/scsi_cdrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scsi/scsi_cdrom.c b/src/scsi/scsi_cdrom.c index 553291263..b23782278 100644 --- a/src/scsi/scsi_cdrom.c +++ b/src/scsi/scsi_cdrom.c @@ -2808,7 +2808,7 @@ scsi_cdrom_drive_reset(int c) id->phase_data_out = scsi_cdrom_phase_data_out; id->command_stop = scsi_cdrom_command_stop; id->bus_master_error = scsi_cdrom_bus_master_error; - id->interrupt_drq = !dev->early; + id->interrupt_drq = dev->early; ide_atapi_attach(id); } From 66f432efe732061c51b543c59b01c83a63831a43 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sat, 29 Oct 2022 22:15:42 +0600 Subject: [PATCH 09/60] mouse_ps2: Unify movement packet reporting mechanisms --- src/device/mouse_ps2.c | 123 ++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 70 deletions(-) diff --git a/src/device/mouse_ps2.c b/src/device/mouse_ps2.c index 29ef8a5bb..083517de2 100644 --- a/src/device/mouse_ps2.c +++ b/src/device/mouse_ps2.c @@ -81,6 +81,57 @@ mouse_clear_data(void *priv) dev->flags &= ~FLAG_CTRLDAT; } +static void +ps2_report_coordinates(mouse_t *dev) +{ + uint8_t buff[3] = {0x08, 0x00, 0x00}; + + if (dev->x > 255) + dev->x = 255; + if (dev->x < -256) + dev->x = -256; + if (dev->y > 255) + dev->y = 255; + if (dev->y < -256) + dev->y = -256; + if (dev->z < -8) + dev->z = -8; + if (dev->z > 7) + dev->z = 7; + + if (dev->x < 0) + buff[0] |= 0x10; + if (dev->y < 0) + buff[0] |= 0x20; + if (mouse_buttons & 0x01) + buff[0] |= 0x01; + if (mouse_buttons & 0x02) + buff[0] |= 0x02; + if (dev->flags & FLAG_INTELLI) { + if (mouse_buttons & 0x04) + buff[0] |= 0x04; + } + buff[1] = (dev->x & 0xff); + buff[2] = (dev->y & 0xff); + + keyboard_at_adddata_mouse(buff[0]); + keyboard_at_adddata_mouse(buff[1]); + keyboard_at_adddata_mouse(buff[2]); + if (dev->flags & FLAG_INTMODE) { + int temp_z = dev->z; + if ((dev->flags & FLAG_5BTN)) { + temp_z &= 0xF; + if (mouse_buttons & 8) + temp_z |= 0x10; + if (mouse_buttons & 16) + temp_z |= 0x20; + } + keyboard_at_adddata_mouse(temp_z); + } + + dev->x = dev->y = dev->z = 0; +} + static void ps2_write(uint8_t val, void *priv) { @@ -143,32 +194,7 @@ ps2_write(uint8_t val, void *priv) case 0xeb: /* Get mouse data */ keyboard_at_adddata_mouse(0xfa); - temp = 0; - if (dev->x < 0) - temp |= 0x10; - if (dev->y < 0) - temp |= 0x20; - if (mouse_buttons & 1) - temp |= 1; - if (mouse_buttons & 2) - temp |= 2; - if ((mouse_buttons & 4) && (dev->flags & FLAG_INTELLI)) - temp |= 4; - keyboard_at_adddata_mouse(temp); - keyboard_at_adddata_mouse(dev->x & 0xff); - keyboard_at_adddata_mouse(dev->y & 0xff); - - if (dev->flags & FLAG_INTMODE) { - int temp_z = dev->z; - if ((dev->flags & FLAG_5BTN)) { - temp_z &= 0xF; - if (mouse_buttons & 8) - temp_z |= 0x10; - if (mouse_buttons & 16) - temp_z |= 0x20; - } - keyboard_at_adddata_mouse(temp_z); - } + ps2_report_coordinates(dev); break; case 0xf2: /* read ID */ @@ -258,50 +284,7 @@ ps2_poll(int x, int y, int z, int b, void *priv) if ((dev->mode == MODE_STREAM) && (dev->flags & FLAG_ENABLED) && (keyboard_at_mouse_pos() < 13)) { dev->b = b; - if (dev->x > 255) - dev->x = 255; - if (dev->x < -256) - dev->x = -256; - if (dev->y > 255) - dev->y = 255; - if (dev->y < -256) - dev->y = -256; - if (dev->z < -8) - dev->z = -8; - if (dev->z > 7) - dev->z = 7; - - if (dev->x < 0) - buff[0] |= 0x10; - if (dev->y < 0) - buff[0] |= 0x20; - if (mouse_buttons & 0x01) - buff[0] |= 0x01; - if (mouse_buttons & 0x02) - buff[0] |= 0x02; - if (dev->flags & FLAG_INTELLI) { - if (mouse_buttons & 0x04) - buff[0] |= 0x04; - } - buff[1] = (dev->x & 0xff); - buff[2] = (dev->y & 0xff); - - keyboard_at_adddata_mouse(buff[0]); - keyboard_at_adddata_mouse(buff[1]); - keyboard_at_adddata_mouse(buff[2]); - if (dev->flags & FLAG_INTMODE) { - int temp_z = dev->z; - if ((dev->flags & FLAG_5BTN)) { - temp_z &= 0xF; - if (mouse_buttons & 8) - temp_z |= 0x10; - if (mouse_buttons & 16) - temp_z |= 0x20; - } - keyboard_at_adddata_mouse(temp_z); - } - - dev->x = dev->y = dev->z = 0; + ps2_report_coordinates(dev); } return (0); From a59ec21f23eeba43da3ed17a387cf2bd86bee1b9 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Oct 2022 18:46:14 +0200 Subject: [PATCH 10/60] Fixed a configuration bug and nerfed the modes of the NEC CDR-260. --- src/config.c | 2 +- src/disk/hdc_ide.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/config.c b/src/config.c index 9c9779984..e4da13422 100644 --- a/src/config.c +++ b/src/config.c @@ -2717,7 +2717,7 @@ save_floppy_and_cdrom_drives(void) } sprintf(temp, "cdrom_%02i_early", c + 1); - if ((cdrom[c].bus_type == 0) || (cdrom[c].early == 1)) { + if ((cdrom[c].bus_type == 0) || (cdrom[c].early == 0)) { ini_section_delete_var(cat, temp); } else { ini_section_set_int(cat, temp, cdrom[c].early); diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 35dfe5dcd..a57283cb2 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -425,7 +425,7 @@ static int ide_get_max(ide_t *ide, int type) { if (ide->type == IDE_ATAPI) - return ide->get_max(!ide_boards[ide->board]->force_ata3 && (ide_bm[ide->board] != NULL), type); + return ide->get_max(!ide->sc->pad0 && !ide_boards[ide->board]->force_ata3 && (ide_bm[ide->board] != NULL), type); switch (type) { case TYPE_PIO: /* PIO */ @@ -458,7 +458,7 @@ static int ide_get_timings(ide_t *ide, int type) { if (ide->type == IDE_ATAPI) - return ide->get_timings(!ide_boards[ide->board]->force_ata3 && (ide_bm[ide->board] != NULL), type); + return ide->get_timings(!ide->sc->pad0 && !ide_boards[ide->board]->force_ata3 && (ide_bm[ide->board] != NULL), type); switch (type) { case TIMINGS_DMA: @@ -584,7 +584,7 @@ ide_identify(ide_t *ide) memset(ide->buffer, 0, 512); if (ide->type == IDE_ATAPI) - ide->identify(ide, !ide_boards[ide->board]->force_ata3 && (ide_bm[ide->board] != NULL)); + ide->identify(ide, !ide->sc->pad0 && !ide_boards[ide->board]->force_ata3 && (ide_bm[ide->board] != NULL)); else if (ide->type != IDE_NONE) ide_hd_identify(ide); else { @@ -884,7 +884,7 @@ ide_atapi_attach(ide_t *ide) ide->type = IDE_ATAPI; ide_allocate_buffer(ide); ide_set_signature(ide); - ide->mdma_mode = (1 << ide->get_max(ide_boards[ide->board]->force_ata3 || !ide_bm[ide->board], TYPE_PIO)); + ide->mdma_mode = (1 << ide->get_max(!ide->sc->pad0 && !ide_boards[ide->board]->force_ata3 && (ide_bm[ide->board] != NULL), TYPE_PIO)); ide->error = 1; ide->cfg_spt = ide->cfg_hpc = 0; #ifndef EARLY_ATAPI @@ -987,7 +987,7 @@ ide_atapi_callback(ide_t *ide) #endif out = (ide->sc->packet_status & 0x01); - if (!ide_boards[ide->board]->force_ata3 && ide_bm[ide->board] && ide_bm[ide->board]->dma) { + if (!ide->sc->pad0 && !ide_boards[ide->board]->force_ata3 && ide_bm[ide->board] && ide_bm[ide->board]->dma) { ret = ide_bm[ide->board]->dma(ide->board, ide->sc->temp_buffer, ide->sc->packet_len, out, ide_bm[ide->board]->priv); From e950ebae171d43cb5785be56d1130b23cd9af631 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Oct 2022 19:10:10 +0200 Subject: [PATCH 11/60] Implemented power down register on the VT82C686 Super I/O chip. --- src/sio/sio_vt82c686.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/sio/sio_vt82c686.c b/src/sio/sio_vt82c686.c index b8047a192..00617e4ea 100644 --- a/src/sio/sio_vt82c686.c +++ b/src/sio/sio_vt82c686.c @@ -57,7 +57,7 @@ vt82c686_fdc_handler(vt82c686_t *dev) fdc_remove(dev->fdc); - if (dev->regs[0x02] & 0x10) + if ((dev->regs[0x02] & 0x10) && !(dev->regs[0x0f] & 0x03)) fdc_set_base(dev->fdc, io_base); fdc_set_dma_ch(dev->fdc, dev->fdc_dma); @@ -77,7 +77,7 @@ vt82c686_lpt_handler(vt82c686_t *dev) lpt1_remove(); - if (((dev->regs[0x02] & 0x03) != 0x03) && (io_base >= 0x100) && (io_base <= io_mask)) + if (((dev->regs[0x02] & 0x03) != 0x03) && !(dev->regs[0x0f] & 0x11) && (io_base >= 0x100) && (io_base <= io_mask)) lpt1_init(io_base); if (dev->lpt_irq) { @@ -92,7 +92,7 @@ vt82c686_serial_handler(vt82c686_t *dev, int uart) { serial_remove(dev->uart[uart]); - if (dev->regs[0x02] & (0x04 << uart)) + if ((dev->regs[0x02] & (0x04 << uart)) && !(dev->regs[0x0f] & ((0x04 << uart) | 0x01))) serial_setup(dev->uart[uart], dev->regs[0x07 + uart] << 2, dev->uart_irq[uart]); } @@ -161,6 +161,10 @@ vt82c686_write(uint16_t port, uint8_t val, void *priv) case 0x0f: dev->regs[reg] &= 0x7f; + vt82c686_lpt_handler(dev); + vt82c686_serial_handler(dev, 0); + vt82c686_serial_handler(dev, 1); + vt82c686_fdc_handler(dev); break; case 0x10: @@ -243,20 +247,13 @@ vt82c686_sio_write(uint8_t addr, uint8_t val, void *priv) static void vt82c686_reset(vt82c686_t *dev) { - memset(dev->regs, 0, 20); + memset(dev->regs, 0, 21); dev->regs[0x00] = 0x3c; dev->regs[0x02] = 0x03; - dev->regs[0x03] = 0xfc; - dev->regs[0x06] = 0xde; - dev->regs[0x07] = 0xfe; - dev->regs[0x08] = 0xbe; fdc_reset(dev->fdc); - serial_setup(dev->uart[0], COM1_ADDR, COM1_IRQ); - serial_setup(dev->uart[1], COM2_ADDR, COM2_IRQ); - vt82c686_lpt_handler(dev); vt82c686_serial_handler(dev, 0); vt82c686_serial_handler(dev, 1); From a20584fee4b2ab7685aa2809f3786b951b001043 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 29 Oct 2022 20:16:12 +0200 Subject: [PATCH 12/60] Fixed the WIN_SRST command on NEC CDR-260, now TEAC_CDI.SYS (OTI-011 ATAPI 1.7B driver) detects it. --- src/disk/hdc_ide.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index a57283cb2..a488d8aa2 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -2157,16 +2157,16 @@ ide_callback(void *priv) ide_set_signature(ide); if (ide->type == IDE_ATAPI) { + ide->sc->error = 1; + if (ide->device_reset) + ide->device_reset(ide->sc); if (ide->sc->pad0) /* pad0 = early */ ide->sc->status = DRDY_STAT | DSC_STAT; else ide->sc->status = 0; - ide->sc->error = 1; - if (ide->device_reset) - ide->device_reset(ide->sc); } ide_irq_raise(ide); - if (ide->type == IDE_ATAPI) + if ((ide->type == IDE_ATAPI) && !ide->sc->pad0) ide->service = 0; return; From 963d186e2e474b27c1fabd33a662f35122aa3c01 Mon Sep 17 00:00:00 2001 From: javi-s Date: Sat, 29 Oct 2022 23:28:06 +0200 Subject: [PATCH 13/60] Fix NVR size for Olivetti M24 --- src/machine/machine_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index e4c437016..c7d2be4ec 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -1999,7 +1999,7 @@ const machine_t machines[] = { .max = 640, .step = 128 }, - .nvrmask = 0, + .nvrmask = 15, .kbc = KBC_OLIVETTI_XT, .kbc_p1 = 0xff00, .gpio = 0xffffffff, From 3a4c7e414e7304e8e4093553a296c2a1f3ee0bee Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 02:57:15 +0200 Subject: [PATCH 14/60] Initialize the ADI 386SX NVR to 0x00's instead of 0xFF's, fixes #2761. --- src/chipset/intel_82335.c | 3 ++- src/include/86box/nvr.h | 1 + src/machine/m_at_286_386sx.c | 4 +++- src/nvr_at.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/chipset/intel_82335.c b/src/chipset/intel_82335.c index 14936530b..20ae0981f 100644 --- a/src/chipset/intel_82335.c +++ b/src/chipset/intel_82335.c @@ -104,7 +104,7 @@ intel_82335_write(uint16_t addr, uint16_t val, void *priv) shadowbios_write = !!(dev->regs[0x22] & 0x01); /* Base System 512/640KB set */ - mem_set_mem_state_both(0x80000, 0x20000, (dev->regs[0x22] & 0x08) ? ENABLE_TOP_128KB : DISABLE_TOP_128KB); + // mem_set_mem_state_both(0x80000, 0x20000, (dev->regs[0x22] & 0x08) ? ENABLE_TOP_128KB : DISABLE_TOP_128KB); /* Video RAM shadow*/ mem_set_mem_state_both(0xa0000, 0x20000, (dev->regs[0x22] & (0x04 << 8)) ? DETERMINE_VIDEO_RAM_WRITE_ACCESS : DISABLED_SHADOW); @@ -167,6 +167,7 @@ intel_82335_init(const device_t *info) memset(dev->regs, 0, sizeof(dev->regs)); + dev->regs[0x22] = 0x08; dev->regs[0x28] = 0xf9; dev->cfg_locked = 0; diff --git a/src/include/86box/nvr.h b/src/include/86box/nvr.h index 97c8786c3..8b59c0883 100644 --- a/src/include/86box/nvr.h +++ b/src/include/86box/nvr.h @@ -86,6 +86,7 @@ extern const device_t at_nvr_old_device; extern const device_t at_nvr_device; extern const device_t ps_nvr_device; extern const device_t amstrad_nvr_device; +extern const device_t amstrad_megapc_nvr_device; extern const device_t ibmat_nvr_device; extern const device_t piix4_nvr_device; extern const device_t ps_no_nmi_nvr_device; diff --git a/src/machine/m_at_286_386sx.c b/src/machine/m_at_286_386sx.c index 0787fd170..a07e981df 100644 --- a/src/machine/m_at_286_386sx.c +++ b/src/machine/m_at_286_386sx.c @@ -37,6 +37,7 @@ #include <86box/fdc.h> #include <86box/fdc_ext.h> #include <86box/hdc.h> +#include <86box/nvr.h> #include <86box/port_6x.h> #include <86box/sio.h> #include <86box/serial.h> @@ -493,7 +494,8 @@ machine_at_adi386sx_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_at_common_init(model); + machine_at_common_init_ex(model, 2); + device_add(&amstrad_megapc_nvr_device); /* NVR that is initialized to all 0x00's. */ device_add(&intel_82335_device); device_add(&keyboard_at_ami_device); diff --git a/src/nvr_at.c b/src/nvr_at.c index d05508e5f..222b635ae 100644 --- a/src/nvr_at.c +++ b/src/nvr_at.c @@ -1299,7 +1299,7 @@ const device_t p6rp4_nvr_device = { }; const device_t amstrad_megapc_nvr_device = { - .name = "Amstrad MegapC NVRAM", + .name = "Amstrad MegaPC NVRAM", .internal_name = "amstrad_megapc_nvr", .flags = DEVICE_ISA | DEVICE_AT, .local = 36, From ab9dd5372e9aa5502f0c64fd4a9325fdf4e6619d Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 02:00:38 +0100 Subject: [PATCH 15/60] Fixed all warnings in config.c. --- src/config.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/config.c b/src/config.c index e4da13422..2c20131c3 100644 --- a/src/config.c +++ b/src/config.c @@ -196,7 +196,7 @@ load_general(void) video_framerate = ini_section_get_int(cat, "video_gl_framerate", -1); video_vsync = ini_section_get_int(cat, "video_gl_vsync", 0); - strncpy(video_shader, ini_section_get_string(cat, "video_gl_shader", ""), sizeof(video_shader)); + strncpy(video_shader, ini_section_get_string(cat, "video_gl_shader", ""), sizeof(video_shader) - 1); window_remember = ini_section_get_int(cat, "window_remember", 0); if (window_remember) { @@ -692,7 +692,7 @@ load_sound(void) if (strlen(p) > 511) fatal("load_sound(): strlen(p) > 511\n"); else - strncpy(temp, p, strlen(p) + 1); + strncpy(temp, p, 511); if (!strcmp(temp, "float") || !strcmp(temp, "1")) sound_is_float = 1; else @@ -913,12 +913,12 @@ load_storage_controllers(void) if (strlen(p) > 511) fatal("load_storage_controllers(): strlen(p) > 511\n"); else - strncpy(cassette_fname, p, MIN(512, strlen(p) + 1)); + strncpy(cassette_fname, p, 511); p = ini_section_get_string(cat, "cassette_mode", ""); if (strlen(p) > 511) fatal("load_storage_controllers(): strlen(p) > 511\n"); else - strncpy(cassette_mode, p, MIN(512, strlen(p) + 1)); + strncpy(cassette_mode, p, 511); cassette_pos = ini_section_get_int(cat, "cassette_position", 0); cassette_srate = ini_section_get_int(cat, "cassette_srate", 44100); cassette_append = !!ini_section_get_int(cat, "cassette_append", 0); @@ -949,7 +949,7 @@ load_storage_controllers(void) if (strlen(p) > 511) fatal("load_storage_controllers(): strlen(p) > 511\n"); else - strncpy(cart_fns[c], p, strlen(p) + 1); + strncpy(cart_fns[c], p, 511); } } @@ -1197,7 +1197,7 @@ load_floppy_drives(void) if (strlen(p) > 511) fatal("load_floppy_drives(): strlen(p) > 511\n"); else - strncpy(floppyfns[c], p, strlen(p) + 1); + strncpy(floppyfns[c], p, 511); /* if (*wp != L'\0') config_log("Floppy%d: %ls\n", c, floppyfns[c]); */ @@ -1259,7 +1259,7 @@ load_floppy_and_cdrom_drives(void) if (strlen(p) > 511) fatal("load_floppy_and_cdrom_drives(): strlen(p) > 511\n"); else - strncpy(floppyfns[c], p, strlen(p) + 1); + strncpy(floppyfns[c], p, 511); /* if (*wp != L'\0') config_log("Floppy%d: %ls\n", c, floppyfns[c]); */ From 99b72cd76a8ddc56ff5ec9af11a3f95cb58aa573 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sun, 30 Oct 2022 19:31:32 +0600 Subject: [PATCH 16/60] qt: Add missing Windows/Menu key X11-to-Set1 mappings --- src/qt/qt_mainwindow.cpp | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index e97864a3a..5b23a859f 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1005,17 +1005,17 @@ std::array x11_to_xt_2 0x51, 0x52, 0x53, - 0x54, + 0x138, 0x55, - 0x56, + 0x35, 0x57, 0x58, - 0, - 0, - 0, - 0, - 0, - 0, + 0x56, + 0x70, + 0x7B, + 0x7D, + 0x2B, + 0x7E, 0, 0x11C, 0x11D, @@ -1032,7 +1032,23 @@ std::array x11_to_xt_2 0x150, 0x151, 0x152, - 0x153 + 0x153, + 0, + 0, /* Mute */ + 0, /* Volume Down */ + 0, /* Volume Up */ + 0, /* Power Off */ + 0, + 0, + 0, + 0, + 0, + 0x70, + 0x7B, + 0x73, + 0x15B, + 0x15C, + 0x15D }; std::array x11_to_xt_vnc @@ -1627,8 +1643,6 @@ void MainWindow::keyPressEvent(QKeyEvent* event) keyboard_input(1, 0x1D); keyboard_input(1, 0x45); } - } else if (event->key() == Qt::Key_Super_L || event->key() == Qt::Key_Super_R) { - keyboard_input(1, event->key() == Qt::Key_Super_L ? 0x15B : 0x15C); } else #ifdef Q_OS_MACOS processMacKeyboardInput(true, event); @@ -1672,9 +1686,6 @@ void MainWindow::keyReleaseEvent(QKeyEvent* event) if (!send_keyboard_input) return; - if (event->key() == Qt::Key_Super_L || event->key() == Qt::Key_Super_R) { - keyboard_input(0, event->key() == Qt::Key_Super_L ? 0x15B : 0x15C); - } else #ifdef Q_OS_MACOS processMacKeyboardInput(false, event); #else From 52f700608a31b2881e7c2e54243993d3d9abcf69 Mon Sep 17 00:00:00 2001 From: javi-s Date: Sun, 30 Oct 2022 15:36:06 +0100 Subject: [PATCH 17/60] Olivetti M24 MM58174 cosmetic fixes --- src/machine/m_xt_olivetti.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/machine/m_xt_olivetti.c b/src/machine/m_xt_olivetti.c index a7d68c1f6..efca944e9 100644 --- a/src/machine/m_xt_olivetti.c +++ b/src/machine/m_xt_olivetti.c @@ -151,15 +151,15 @@ mm58174_time_set(uint8_t *regs, struct tm *tm) regs[MM58174_SECOND10] = (tm->tm_sec / 10); regs[MM58174_MINUTE1] = (tm->tm_min % 10); regs[MM58174_MINUTE10] = (tm->tm_min / 10); - regs[MM58174_HOUR1] = (tm->tm_hour % 10); - regs[MM58174_HOUR10] = (tm->tm_hour / 10); - regs[MM58174_WEEKDAY] = (tm->tm_wday + 1); - regs[MM58174_DAY1] = (tm->tm_mday % 10); - regs[MM58174_DAY10] = (tm->tm_mday / 10); - regs[MM58174_MONTH1] = ((tm->tm_mon + 1) % 10); - regs[MM58174_MONTH10] = ((tm->tm_mon + 1) / 10); - /* MM87174 does not store the year, M24 uses the IRQ register to count 8 years from leap year */ - regs[MM58174_IRQ] = ((tm->tm_year + 1900) % 8); + regs[MM58174_HOUR1] = (tm->tm_hour % 10); + regs[MM58174_HOUR10] = (tm->tm_hour / 10); + regs[MM58174_WEEKDAY] = (tm->tm_wday + 1); + regs[MM58174_DAY1] = (tm->tm_mday % 10); + regs[MM58174_DAY10] = (tm->tm_mday / 10); + regs[MM58174_MONTH1] = ((tm->tm_mon + 1) % 10); + regs[MM58174_MONTH10] = ((tm->tm_mon + 1) / 10); + /* MM58174 does not store the year, M24 uses the IRQ register to count 8 years from leap year */ + regs[MM58174_IRQ] = ((tm->tm_year + 1900) % 8); regs[MM58174_LEAPYEAR] = 8 >> ((regs[MM58174_IRQ] & 0x07) & 0x03); } @@ -168,13 +168,13 @@ mm58174_time_set(uint8_t *regs, struct tm *tm) static void mm58174_time_get(uint8_t *regs, struct tm *tm) { - tm->tm_sec = nibbles(MM58174_SECOND); - tm->tm_min = nibbles(MM58174_MINUTE); + tm->tm_sec = nibbles(MM58174_SECOND); + tm->tm_min = nibbles(MM58174_MINUTE); tm->tm_hour = nibbles(MM58174_HOUR); tm->tm_wday = (regs[MM58174_WEEKDAY] - 1); tm->tm_mday = nibbles(MM58174_DAY); tm->tm_mon = (nibbles(MM58174_MONTH) - 1); - /* MM87174AN does not store the year */ + /* MM58174 does not store the year */ tm->tm_year = (1984 + (regs[MM58174_IRQ] & 0x07) - 1900); } From 5bad039be619a761f4f16e95c091ee9a232ec8d4 Mon Sep 17 00:00:00 2001 From: javi-s Date: Sun, 30 Oct 2022 16:34:42 +0100 Subject: [PATCH 18/60] Emulation of National Semiconductor MM58274 RTC Used in Olivetti M240 --- src/machine/m_xt_olivetti.c | 190 ++++++++++++++++++++++++++++++++++-- src/machine/machine_table.c | 2 +- 2 files changed, 185 insertions(+), 7 deletions(-) diff --git a/src/machine/m_xt_olivetti.c b/src/machine/m_xt_olivetti.c index efca944e9..e52450daa 100644 --- a/src/machine/m_xt_olivetti.c +++ b/src/machine/m_xt_olivetti.c @@ -8,7 +8,8 @@ * * Emulation of the Olivetti XT-compatible machines. * - * - Supports MM58174 real-time clock emulation + * - Supports MM58174 real-time clock emulation (M24) + * - Supports MM58274 real-time clock emulation (M240) * * Authors: Sarah Walker, * Miran Grca, @@ -90,6 +91,26 @@ enum MM58174_ADDR { MM58174_IRQ /* Interrupt register, read / write */ }; +enum MM58274_ADDR { + /* Registers */ + MM58274_CONTROL, /* Control register */ + MM58274_TENTHS, /* Tenths of second, read only */ + MM58274_SECOND1, + MM58274_SECOND10, + MM58274_MINUTE1, + MM58274_MINUTE10, + MM58274_HOUR1, + MM58274_HOUR10, + MM58274_DAY1, + MM58274_DAY10, + MM58274_MONTH1, + MM58274_MONTH10, + MM58274_YEAR1, + MM58274_YEAR10, + MM58274_WEEKDAY, + MM58274_SETTINGS /* Settings register */ +}; + static struct tm intclk; typedef struct { @@ -180,7 +201,7 @@ mm58174_time_get(uint8_t *regs, struct tm *tm) /* One more second has passed, update the internal clock. */ static void -mm58174_recalc() +mm58x74_recalc() { /* Ping the internal clock. */ if (++intclk.tm_sec == 60) { @@ -205,7 +226,7 @@ mm58174_recalc() static void mm58174_tick(nvr_t *nvr) { - mm58174_recalc(); + mm58x74_recalc(); mm58174_time_set(nvr->regs, &intclk); } @@ -307,6 +328,157 @@ mm58174_init(nvr_t *nvr, int size) mm58174_read, NULL, NULL, mm58174_write, NULL, NULL, nvr); } +/* Set the chip time. */ +static void +mm58274_time_set(uint8_t *regs, struct tm *tm) +{ + regs[MM58274_SECOND1] = (tm->tm_sec % 10); + regs[MM58274_SECOND10] = (tm->tm_sec / 10); + regs[MM58274_MINUTE1] = (tm->tm_min % 10); + regs[MM58274_MINUTE10] = (tm->tm_min / 10); + regs[MM58274_HOUR1] = (tm->tm_hour % 10); + regs[MM58274_HOUR10] = (tm->tm_hour / 10); + /* Store hour in 24-hour or 12-hour mode */ + if (regs[MM58274_SETTINGS] & 0x01) { + regs[MM58274_HOUR1] = (tm->tm_hour % 10); + regs[MM58274_HOUR10] = (tm->tm_hour / 10); + } else { + regs[MM58274_HOUR1] = ((tm->tm_hour % 12) % 10); + regs[MM58274_HOUR10] = (((tm->tm_hour % 12) / 10)); + if (tm->tm_hour >= 12) + regs[MM58274_SETTINGS] |= 0x04; + else + regs[MM58274_SETTINGS] &= 0x0B; + } + regs[MM58274_WEEKDAY] = (tm->tm_wday + 1); + regs[MM58274_DAY1] = (tm->tm_mday % 10); + regs[MM58274_DAY10] = (tm->tm_mday / 10); + regs[MM58274_MONTH1] = ((tm->tm_mon + 1) % 10); + regs[MM58274_MONTH10] = ((tm->tm_mon + 1) / 10); + /* MM58274 can store 00 to 99 years but M240 uses the YEAR1 register to count 8 years from leap year */ + regs[MM58274_YEAR1] = ((tm->tm_year + 1900) % 8); + /* Keep bit 0 and 1 12-hour / 24-hour and AM / PM */ + regs[MM58274_SETTINGS] &= 0x03; + /* Set leap counter bits 2 and 3 */ + regs[MM58274_SETTINGS] += (4* (regs[MM58274_YEAR1] & 0x03)); +} + +/* Get the chip time. */ +static void +mm58274_time_get(uint8_t *regs, struct tm *tm) +{ + tm->tm_sec = nibbles(MM58274_SECOND); + tm->tm_min = nibbles(MM58274_MINUTE); + /* Read hour in 24-hour or 12-hour mode */ + if (regs[MM58274_SETTINGS] & 0x01) + tm->tm_hour = nibbles(MM58274_HOUR); + else + tm->tm_hour = ((nibbles(MM58274_HOUR) % 12) + (regs[MM58274_SETTINGS] & 0x04) ? 12 : 0); + tm->tm_wday = (regs[MM58274_WEEKDAY] - 1); + tm->tm_mday = nibbles(MM58274_DAY); + tm->tm_mon = (nibbles(MM58274_MONTH) - 1); + /* MM58274 can store 00 to 99 years but M240 uses the YEAR1 register to count 8 years from leap year */ + tm->tm_year = (1984 + regs[MM58274_YEAR1] - 1900); +} + +/* This is called every second through the NVR/RTC hook. */ +static void +mm58274_tick(nvr_t *nvr) +{ + mm58x74_recalc(); + mm58274_time_set(nvr->regs, &intclk); +} + +static void +mm58274_start(nvr_t *nvr) +{ + struct tm tm; + + /* Initialize the internal and chip times. */ + if (time_sync & TIME_SYNC_ENABLED) { + /* Use the internal clock's time. */ + nvr_time_get(&tm); + mm58274_time_set(nvr->regs, &tm); + } else { + /* Set the internal clock from the chip time. */ + mm58274_time_get(nvr->regs, &tm); + nvr_time_set(&tm); + } + mm58274_time_get(nvr->regs, &intclk); +} + +/* Write to one of the chip registers. */ +static void +mm58274_write(uint16_t addr, uint8_t val, void *priv) +{ + nvr_t *nvr = (nvr_t *) priv; + + addr &= 0x0f; + val &= 0x0f; + + /* Update non-read-only changed values if not synchronizing time to host */ + if ((addr != MM58274_TENTHS)) + if ((nvr->regs[addr] != val) && !(time_sync & TIME_SYNC_ENABLED)) + nvr_dosave = 1; + + if ((addr == MM58274_CONTROL) && (val & 0x04)) { + /* When timer starts, MM58274 sets tenths of second to 0 */ + nvr->regs[MM58274_TENTHS] = 0; + } + + /* Store the new value */ + nvr->regs[addr] = val; + + /* Update internal clock with MM58274 time */ + mm58274_time_get(nvr->regs, &intclk); +} + +/* Read from one of the chip registers. */ +static uint8_t +mm58274_read(uint16_t addr, void *priv) +{ + nvr_t *nvr = (nvr_t *) priv; + + addr &= 0x0f; + + /* Grab and return the desired value */ + return (nvr->regs[addr]); +} + +/* Reset the MM58274 to a default state. */ +static void +mm58274_reset(nvr_t *nvr) +{ + /* Clear the NVRAM. */ + memset(nvr->regs, 0xff, nvr->size); + + /* Reset the RTC registers. */ + memset(nvr->regs, 0x00, 16); + nvr->regs[MM58274_WEEKDAY] = 0x01; + nvr->regs[MM58274_DAY1] = 0x01; + nvr->regs[MM58274_MONTH1] = 0x01; + nvr->regs[MM58274_SETTINGS] = 0x01; +} + +static void +mm58274_init(nvr_t *nvr, int size) +{ + /* This is machine specific. */ + nvr->size = size; + nvr->irq = -1; + + /* Set up any local handlers here. */ + nvr->reset = mm58274_reset; + nvr->start = mm58274_start; + nvr->tick = mm58274_tick; + + /* Initialize the actual NVR. */ + nvr_init(nvr); + + io_sethandler(0x0070, 16, + mm58274_read, NULL, NULL, mm58274_write, NULL, NULL, nvr); +} + static void m24_kbd_poll(void *priv) { @@ -975,6 +1147,7 @@ int machine_xt_m240_init(const machine_t *model) { int ret; + nvr_t *nvr; ret = bios_load_interleaved("roms/machines/m240/olivetti_m240_pch6_2.04_low.bin", "roms/machines/m240/olivetti_m240_pch5_2.04_high.bin", @@ -999,9 +1172,6 @@ machine_xt_m240_init(const machine_t *model) device_add(&keyboard_at_olivetti_device); device_add(&port_6x_olivetti_device); - /* FIXME: make sure this is correct?? */ - device_add(&at_nvr_device); - if (fdc_type == FDC_INTERNAL) device_add(&fdc_xt_device); @@ -1010,6 +1180,14 @@ machine_xt_m240_init(const machine_t *model) nmi_init(); + /* Allocate an NVR for this machine. */ + nvr = (nvr_t *) malloc(sizeof(nvr_t)); + if (nvr == NULL) + return (0); + memset(nvr, 0x00, sizeof(nvr_t)); + + mm58274_init(nvr, model->nvrmask + 1); + return ret; } diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index c7d2be4ec..2f51d559f 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -2036,7 +2036,7 @@ const machine_t machines[] = { .max = 640, .step = 128 }, - .nvrmask = 0, + .nvrmask = 15, .kbc = KBC_OLIVETTI, .kbc_p1 = 0xff04, .gpio = 0xffffffff, From 9ec317d8e6c59c8afa1d8714feeb4739038afbc8 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 16:44:31 +0100 Subject: [PATCH 19/60] Fixed two warnings. --- src/device/mouse_ps2.c | 1 - src/qt/qt_deviceconfig.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/src/device/mouse_ps2.c b/src/device/mouse_ps2.c index 083517de2..39390db02 100644 --- a/src/device/mouse_ps2.c +++ b/src/device/mouse_ps2.c @@ -265,7 +265,6 @@ static int ps2_poll(int x, int y, int z, int b, void *priv) { mouse_t *dev = (mouse_t *) priv; - uint8_t buff[3] = { 0x08, 0x00, 0x00 }; if (!x && !y && !z && (b == dev->b)) return (0xff); diff --git a/src/qt/qt_deviceconfig.cpp b/src/qt/qt_deviceconfig.cpp index 7218aab6e..390a5ab10 100644 --- a/src/qt/qt_deviceconfig.cpp +++ b/src/qt/qt_deviceconfig.cpp @@ -54,7 +54,6 @@ DeviceConfig::~DeviceConfig() void DeviceConfig::ConfigureDevice(const _device_* device, int instance, Settings* settings) { DeviceConfig dc(settings); dc.setWindowTitle(QString("%1 Device Configuration").arg(device->name)); - int combo_to_struct[256]; int c, d, p, q; device_context_t device_context; From 934f6dd500c88ddc31585b15a0aba5b35ec43b49 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 16:49:38 +0100 Subject: [PATCH 20/60] Beginning of the process to remove vid_blit_memtoscreen_8() to get rid of the flickering on QT. --- src/include/86box/video.h | 2 ++ src/video/vid_cga.c | 19 +++++++------------ src/video/video.c | 13 +++++++++++++ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 24ecdbd1c..2dd6f3627 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -227,6 +227,7 @@ extern void video_setblit(void (*blit)(int, int, int, int, int)); extern void video_blend(int x, int y); extern void video_blit_memtoscreen_8(int x, int y, int w, int h); extern void video_blend_monitor(int x, int y, int monitor_index); +extern void video_process_8_monitor(int x, int y, int monitor_index); extern void video_blit_memtoscreen_8_monitor(int x, int y, int w, int h, int monitor_index); extern void video_blit_memtoscreen_monitor(int x, int y, int w, int h, int monitor_index); extern void video_blit_complete_monitor(int monitor_index); @@ -262,6 +263,7 @@ extern uint32_t video_color_transform(uint32_t color); #define video_get_type() video_get_type_monitor(0) #define video_blend(x, y) video_blend_monitor(x, y, monitor_index_global) #define video_blit_memtoscreen(x, y, w, h) video_blit_memtoscreen_monitor(x, y, w, h, monitor_index_global) +#define video_process_8(x, y) video_process_8_monitor(x, y, monitor_index_global) #define video_blit_memtoscreen_8(x, y, w, h) video_blit_memtoscreen_8_monitor(x, y, w, h, monitor_index_global) #define video_blit_complete() video_blit_complete_monitor(monitor_index_global) #define video_wait_for_blit() video_wait_for_blit_monitor(monitor_index_global) diff --git a/src/video/vid_cga.c b/src/video/vid_cga.c index b68f093e1..3cd581488 100644 --- a/src/video/vid_cga.c +++ b/src/video/vid_cga.c @@ -354,6 +354,9 @@ cga_poll(void *p) Composite_Process(cga->cgamode, border, x >> 2, buffer32->line[(cga->displine << 1)]); Composite_Process(cga->cgamode, border, x >> 2, buffer32->line[(cga->displine << 1) + 1]); + } else { + video_process_8(x, cga->displine << 1); + video_process_8(x, (cga->displine << 1) + 1); } cga->sc = oldsc; @@ -448,19 +451,11 @@ cga_poll(void *p) } if (enable_overscan) { - if (cga->composite) - video_blit_memtoscreen(0, (cga->firstline - 4) << 1, - xsize, ((cga->lastline - cga->firstline) + 8) << 1); - else - video_blit_memtoscreen_8(0, (cga->firstline - 4) << 1, - xsize, ((cga->lastline - cga->firstline) + 8) << 1); + video_blit_memtoscreen(0, (cga->firstline - 4) << 1, + xsize, ((cga->lastline - cga->firstline) + 8) << 1); } else { - if (cga->composite) - video_blit_memtoscreen(8, cga->firstline << 1, - xsize, (cga->lastline - cga->firstline) << 1); - else - video_blit_memtoscreen_8(8, cga->firstline << 1, - xsize, (cga->lastline - cga->firstline) << 1); + video_blit_memtoscreen(8, cga->firstline << 1, + xsize, (cga->lastline - cga->firstline) << 1); } } diff --git a/src/video/video.c b/src/video/video.c index ae2fcf5eb..f6cf6623a 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -535,6 +535,19 @@ video_blend_monitor(int x, int y, int monitor_index) } } +void +video_process_8_monitor(int x, int y, int monitor_index) +{ + int xx; + + for (xx = 0; xx < x; xx++) { + if (monitors[monitor_index].target_buffer->line[y][xx] <= 0xff) + monitors[monitor_index].target_buffer->line[y][xx] = monitors[monitor_index].mon_pal_lookup[monitors[monitor_index].target_buffer->line[y][xx]]; + else + monitors[monitor_index].target_buffer->line[y][xx] = 0x00000000; + } +} + void video_blit_memtoscreen_8_monitor(int x, int y, int w, int h, int monitor_index) { From 9b6a70916a47bebcd940fc67cb7bf947ea7a2e7a Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sun, 30 Oct 2022 21:50:24 +0600 Subject: [PATCH 21/60] Fix warning --- src/device/mouse_ps2.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/device/mouse_ps2.c b/src/device/mouse_ps2.c index 083517de2..39390db02 100644 --- a/src/device/mouse_ps2.c +++ b/src/device/mouse_ps2.c @@ -265,7 +265,6 @@ static int ps2_poll(int x, int y, int z, int b, void *priv) { mouse_t *dev = (mouse_t *) priv; - uint8_t buff[3] = { 0x08, 0x00, 0x00 }; if (!x && !y && !z && (b == dev->b)) return (0xff); From b4b5a6aea2664ecef66db79ef4995c46b6ed2d3c Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 16:51:21 +0100 Subject: [PATCH 22/60] Amstrad. --- src/machine/m_amstrad.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index 023f94d5b..5fa15fe76 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -469,6 +469,14 @@ vid_poll_1512(void *priv) } } + if (vid->cgamode & 1) + x = (vid->crtc[1] << 3) + 16; + else + x = (vid->crtc[1] << 4) + 16; + + video_process_8(x, vid->displine << 1); + video_process_8(x, (vid->displine << 1) + 1); + vid->sc = oldsc; if (vid->vsynctime) vid->stat |= 8; @@ -548,11 +556,11 @@ vid_poll_1512(void *priv) } if (enable_overscan) { - video_blit_memtoscreen_8(0, (vid->firstline - 4) << 1, - xsize, ((vid->lastline - vid->firstline) + 8) << 1); + video_blit_memtoscreen(0, (vid->firstline - 4) << 1, + xsize, ((vid->lastline - vid->firstline) + 8) << 1); } else { - video_blit_memtoscreen_8(8, vid->firstline << 1, - xsize, (vid->lastline - vid->firstline) << 1); + video_blit_memtoscreen(8, vid->firstline << 1, + xsize, (vid->lastline - vid->firstline) << 1); } } From 4aaa7ae293e1646b50f402f38b2586f9fa0546af Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 16:52:18 +0100 Subject: [PATCH 23/60] PCjr. --- src/machine/m_pcjr.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index 0ea34ea19..0418dfa4c 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -433,6 +433,9 @@ vid_poll(void *p) if (pcjr->composite) { Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[(pcjr->displine << 1)]); Composite_Process(pcjr->array[0], 0, x >> 2, buffer32->line[(pcjr->displine << 1) + 1]); + } else { + video_process_8(x, pcjr->displine << 1); + video_process_8(x, (pcjr->displine << 1) + 1); } pcjr->sc = oldsc; if (pcjr->vc == pcjr->crtc[7] && !pcjr->sc) { @@ -519,19 +522,11 @@ vid_poll(void *p) } if (enable_overscan) { - if (pcjr->composite) - video_blit_memtoscreen(0, (pcjr->firstline - 4) << 1, - xsize, ((pcjr->lastline - pcjr->firstline) + 8) << 1); - else - video_blit_memtoscreen_8(0, (pcjr->firstline - 4) << 1, - xsize, ((pcjr->lastline - pcjr->firstline) + 8) << 1); + video_blit_memtoscreen(0, (pcjr->firstline - 4) << 1, + xsize, ((pcjr->lastline - pcjr->firstline) + 8) << 1); } else { - if (pcjr->composite) - video_blit_memtoscreen(8, pcjr->firstline << 1, - xsize, (pcjr->lastline - pcjr->firstline) << 1); - else - video_blit_memtoscreen_8(8, pcjr->firstline << 1, - xsize, (pcjr->lastline - pcjr->firstline) << 1); + video_blit_memtoscreen(8, pcjr->firstline << 1, + xsize, (pcjr->lastline - pcjr->firstline) << 1); } } From ef3db28e0a6976fdc7a31d75237256fa1f29ca64 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 16:53:14 +0100 Subject: [PATCH 24/60] Tandy. --- src/machine/m_tandy.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index 61fe19465..18c5652ad 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -875,6 +875,9 @@ vid_poll(void *priv) if (!dev->is_sl2 && vid->composite) { Composite_Process(vid->mode, 0, x >> 2, buffer32->line[(vid->displine << 1)]); Composite_Process(vid->mode, 0, x >> 2, buffer32->line[(vid->displine << 1) + 1]); + } else { + video_process_8(x, vid->displine << 1); + video_process_8(x, (vid->displine << 1) + 1); } vid->sc = oldsc; if (vid->vc == vid->crtc[7] && !vid->sc) @@ -968,19 +971,11 @@ vid_poll(void *priv) } if (enable_overscan) { - if (!dev->is_sl2 && vid->composite) - video_blit_memtoscreen(0, (vid->firstline - 4) << 1, - xsize, ((vid->lastline - vid->firstline) + 8) << 1); - else - video_blit_memtoscreen_8(0, (vid->firstline - 4) << 1, - xsize, ((vid->lastline - vid->firstline) + 8) << 1); + video_blit_memtoscreen(0, (vid->firstline - 4) << 1, + xsize, ((vid->lastline - vid->firstline) + 8) << 1); } else { - if (!dev->is_sl2 && vid->composite) - video_blit_memtoscreen(8, vid->firstline << 1, - xsize, (vid->lastline - vid->firstline) << 1); - else - video_blit_memtoscreen_8(8, vid->firstline << 1, - xsize, (vid->lastline - vid->firstline) << 1); + video_blit_memtoscreen(8, vid->firstline << 1, + xsize, (vid->lastline - vid->firstline) << 1); } } From e4b267ee1b9bce4a92f2b0283a179065f4385860 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 16:54:27 +0100 Subject: [PATCH 25/60] Plantronics ColorPlus. --- src/video/vid_colorplus.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/video/vid_colorplus.c b/src/video/vid_colorplus.c index 03f20543d..6dbb10d33 100644 --- a/src/video/vid_colorplus.c +++ b/src/video/vid_colorplus.c @@ -207,6 +207,8 @@ colorplus_poll(void *p) if (colorplus->cga.composite) Composite_Process(colorplus->cga.cgamode, 0, x >> 2, buffer32->line[colorplus->cga.displine]); + else + video_process_8(x, colorplus->cga.displine); colorplus->cga.sc = oldsc; if (colorplus->cga.vc == colorplus->cga.crtc[7] && !colorplus->cga.sc) @@ -281,10 +283,7 @@ colorplus_poll(void *p) set_screen_size(xsize, (ysize << 1) + 16); } - if (colorplus->cga.composite) - video_blit_memtoscreen(0, colorplus->cga.firstline - 4, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8); - else - video_blit_memtoscreen_8(0, colorplus->cga.firstline - 4, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8); + video_blit_memtoscreen(0, colorplus->cga.firstline - 4, xsize, (colorplus->cga.lastline - colorplus->cga.firstline) + 8); frames++; video_res_x = xsize - 16; From a242446ce7e32ede71735bf6fac75b1cf500467c Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 16:55:52 +0100 Subject: [PATCH 26/60] Compaq CGA. --- src/video/vid_compaq_cga.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/video/vid_compaq_cga.c b/src/video/vid_compaq_cga.c index 5bc7c6e99..da4006339 100644 --- a/src/video/vid_compaq_cga.c +++ b/src/video/vid_compaq_cga.c @@ -243,7 +243,8 @@ compaq_cga_poll(void *p) Composite_Process(self->cga.cgamode & 0x7f, border, x >> 2, buffer32->line[self->cga.displine]); else Composite_Process(self->cga.cgamode, border, x >> 2, buffer32->line[self->cga.displine]); - } + } else + video_process_8(x, self->cga.displine); self->cga.sc = oldsc; if (self->cga.vc == self->cga.crtc[7] && !self->cga.sc) @@ -338,17 +339,10 @@ compaq_cga_poll(void *p) video_force_resize_set(0); } - if (enable_overscan) { - if (self->cga.composite) - video_blit_memtoscreen(0, self->cga.firstline - 8, xsize, (self->cga.lastline - self->cga.firstline) + 16); - else - video_blit_memtoscreen_8(0, self->cga.firstline - 8, xsize, (self->cga.lastline - self->cga.firstline) + 16); - } else { - if (self->cga.composite) - video_blit_memtoscreen(8, self->cga.firstline, xsize, self->cga.lastline - self->cga.firstline); - else - video_blit_memtoscreen_8(8, self->cga.firstline, xsize, self->cga.lastline - self->cga.firstline); - } + if (enable_overscan) + video_blit_memtoscreen(0, self->cga.firstline - 8, xsize, (self->cga.lastline - self->cga.firstline) + 16); + else + video_blit_memtoscreen(8, self->cga.firstline, xsize, self->cga.lastline - self->cga.firstline); } frames++; From db7fbd0eb2ebd2c078788f3ca26c3deeaa528c25 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 16:57:46 +0100 Subject: [PATCH 27/60] MDSI Genius. --- src/video/vid_genius.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/vid_genius.c b/src/video/vid_genius.c index 643aaa643..57e9735bd 100644 --- a/src/video/vid_genius.c +++ b/src/video/vid_genius.c @@ -659,6 +659,8 @@ genius_poll(void *p) * of the lot */ if (genius->mda_ctrl & 8) genius_textline(genius, background, 1, 1); + + video_process_8(GENIUS_XSIZE, genius->displine); } genius->displine++; /* Hardcode a fixed refresh rate and VSYNC timing */ @@ -696,7 +698,7 @@ genius_poll(void *p) video_force_resize_set(0); } - video_blit_memtoscreen_8(0, 0, xsize, ysize); + video_blit_memtoscreen(0, 0, xsize, ysize); frames++; /* Fixed 728x1008 resolution */ From 454fdd2b8384db21998de8998a81b287421b1961 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 16:59:01 +0100 Subject: [PATCH 28/60] Hercules. --- src/video/vid_hercules.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/video/vid_hercules.c b/src/video/vid_hercules.c index c5d91e96d..d141ad0e8 100644 --- a/src/video/vid_hercules.c +++ b/src/video/vid_hercules.c @@ -361,6 +361,13 @@ hercules_poll(void *priv) } hercules_render_overscan_right(dev); + + if (dev->ctrl & 0x02) + x = dev->crtc[1] << 4; + else + x = dev->crtc[1] * 9; + + video_process_8(x, dev->displine + 14); } dev->sc = oldsc; @@ -475,9 +482,9 @@ hercules_poll(void *priv) } if (enable_overscan) - video_blit_memtoscreen_8(0, dev->firstline, xsize + 16, ysize + 28); + video_blit_memtoscreen(0, dev->firstline, xsize + 16, ysize + 28); else - video_blit_memtoscreen_8(8, dev->firstline + 14, xsize, ysize); + video_blit_memtoscreen(8, dev->firstline + 14, xsize, ysize); frames++; // if ((dev->ctrl & 2) && (dev->ctrl2 & 1)) { if (dev->ctrl & 0x02) { From 6ffd1b3611b856e62f8b596191d98158f63c5a04 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 17:00:02 +0100 Subject: [PATCH 29/60] Hercules Plus. --- src/mem/COMPACT.EXE | Bin 0 -> 38937 bytes src/video/vid_herculesplus.c | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 src/mem/COMPACT.EXE diff --git a/src/mem/COMPACT.EXE b/src/mem/COMPACT.EXE new file mode 100644 index 0000000000000000000000000000000000000000..1e2de9cb7887e3f03a8f703eb7d1a04bedf68fd3 GIT binary patch literal 38937 zcmeZ`l4S5@SjOPMAkFmue+(ys!t06%R|W<-1_lO31||jrPF5xchOLYY48@EL3+P7Ff3tUVCZ6CU`Sz_5;)fuV_+ zfgypJfq{>ifq{p?fRl^CfHRYgfq{{Yf#D4+1H*Mz28I?^1_nL`1I~C(28KXR1_mom z28QPx3=BaW3=F^685m;O85mgE85r)fF)&PKV_*|&A`CU&A@P;i-AFc!GJS^n}I@hP?s|4C@3K z7^Vp@FtiIWFeoq>aLO?laLRzx3NtWN2{AA%5@cYQBFMmCEXKg_M1+Asg~5PRiNSzV zOp1XaOp<}&rUU~+w>Ze}2ArXC3=BtQ85pL?GBDK3GBCu;GB8BSGcdf6V_?u=FyNf7 z%E0hOg@Hkf!GP0HlY!x-1_Q%n4F(1;4F(1+4F(1o4F-k@>I@7)>I@89)fgDK)EF49 zYB4ahYceqCF&J>_Fc@$)=`b)v>M$@wXfrSvfc&k`z!0s+z+k1vz+l8+!1>6Cfg#G8 zfx*Ovf#H}n1A`fZ0jCLr0jH`h1H%>@28K)<28QeQ3=9?w2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X@@2weH*r=@}Gs@%lnjLf`LP|D0K z1_yglYB9L2gB1IqP*6xp1tpEF(%ht+)D(sCj7(4fLUK}JX(lwCflKS+5>R0QP66N~ z3XVI7t3aLyB|`;BB7~&N+{BbraC(4L7obWg6_hnfQbA=ELug)hUVeF=LTO%R34;r` zNCSlir~<2mOD5;%<|gK)Ft{X^Btq(b2B*Xng`(8L($wM-h2oN;(&Q3_oYcJZk_?96 z)YNRKBADU1sVSL>3MG{VsSLrX$tC$k;1CB_qYME>pvt63A-@!y1qu=iQi~YEi!w`6 z6~OI6hM?5M6e!a@H7~U&F$df}FD*)C@XQ0X*ui-X)R+V(R!A|fUjkJZsp0f)ociGbjW(GdKn*Fo^N4VVB}v!|v(i>*VRL04h@%Je_<&B@=}0 z4=S}46oMmz8GM7m!eBNpR{*48lboNImI-b^B$j~6ABFPF;tWuJfVU37B^9JtQUG_Q z$kSV_0Pb8cymez>Si=rsQ-{37YwaBG=IP@a@9F2}kK0TUhQ`K5Mo{ktyP7<{HSEp^ zDVZ3C7zA&WH5vk=Aut*OqaiS&LZFThR9AsWkIsMl1lLpa~3^umF%ew1GlDPh;5h z|9^;Y00XGqp$BVwh%qrq@N)9-@UU};iTxMi6=M3Ykyo0NqsaiJv~?AfF$@9;fW5=W z07(haB6{na*1DlnM-Oi14DpghzH2Cddc~@ z40@>*sSMa!bLYf2u-_BkKw`V`S^l$PP-}AyJLzyWI|!~}x3Tf_4R*J)V_*m}GcYjV z<ctrl & HERCULESPLUS_CTRL_GRAPH) && (dev->ctrl2 & HERCULESPLUS_CTRL2_GRAPH)) + x = dev->crtc[1] << 4; + else + x = dev->crtc[1] * 9; + + video_process_8(x, dev->displine); } dev->sc = oldsc; if (dev->vc == dev->crtc[7] && !dev->sc) @@ -583,7 +590,7 @@ herculesplus_poll(void *priv) if (video_force_resize_get()) video_force_resize_set(0); } - video_blit_memtoscreen_8(0, dev->firstline, xsize, dev->lastline - dev->firstline); + video_blit_memtoscreen(0, dev->firstline, xsize, dev->lastline - dev->firstline); frames++; if ((dev->ctrl & HERCULESPLUS_CTRL_GRAPH) && (dev->ctrl2 & HERCULESPLUS_CTRL2_GRAPH)) { video_res_x = dev->crtc[1] * 16; From 82e36a163fd13067a53569920fc78efd5445843b Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 17:01:18 +0100 Subject: [PATCH 30/60] Remove the excess .EXE file. --- src/mem/COMPACT.EXE | Bin 38937 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/mem/COMPACT.EXE diff --git a/src/mem/COMPACT.EXE b/src/mem/COMPACT.EXE deleted file mode 100644 index 1e2de9cb7887e3f03a8f703eb7d1a04bedf68fd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 38937 zcmeZ`l4S5@SjOPMAkFmue+(ys!t06%R|W<-1_lO31||jrPF5xchOLYY48@EL3+P7Ff3tUVCZ6CU`Sz_5;)fuV_+ zfgypJfq{>ifq{p?fRl^CfHRYgfq{{Yf#D4+1H*Mz28I?^1_nL`1I~C(28KXR1_mom z28QPx3=BaW3=F^685m;O85mgE85r)fF)&PKV_*|&A`CU&A@P;i-AFc!GJS^n}I@hP?s|4C@3K z7^Vp@FtiIWFeoq>aLO?laLRzx3NtWN2{AA%5@cYQBFMmCEXKg_M1+Asg~5PRiNSzV zOp1XaOp<}&rUU~+w>Ze}2ArXC3=BtQ85pL?GBDK3GBCu;GB8BSGcdf6V_?u=FyNf7 z%E0hOg@Hkf!GP0HlY!x-1_Q%n4F(1;4F(1+4F(1o4F-k@>I@7)>I@89)fgDK)EF49 zYB4ahYceqCF&J>_Fc@$)=`b)v>M$@wXfrSvfc&k`z!0s+z+k1vz+l8+!1>6Cfg#G8 zfx*Ovf#H}n1A`fZ0jCLr0jH`h1H%>@28K)<28QeQ3=9?w2Aoz52Annw2AtVE8`$%C zHn11-Y+x_v*}z`Svw^*yX9IgP&j$8(o(=5XJR8{ic{Z?5=GnkLoo564Y@QA5^La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+5>R0QP66N~ z3XVI7t3aLyB|`;BB7~&N+{BbraC(4L7obWg6_hnfQbA=ELug)hUVeF=LTO%R34;r` zNCSlir~<2mOD5;%<|gK)Ft{X^Btq(b2B*Xng`(8L($wM-h2oN;(&Q3_oYcJZk_?96 z)YNRKBADU1sVSL>3MG{VsSLrX$tC$k;1CB_qYME>pvt63A-@!y1qu=iQi~YEi!w`6 z6~OI6hM?5M6e!a@H7~U&F$df}FD*)C@XQ0X*ui-X)R+V(R!A|fUjkJZsp0f)ociGbjW(GdKn*Fo^N4VVB}v!|v(i>*VRL04h@%Je_<&B@=}0 z4=S}46oMmz8GM7m!eBNpR{*48lboNImI-b^B$j~6ABFPF;tWuJfVU37B^9JtQUG_Q z$kSV_0Pb8cymez>Si=rsQ-{37YwaBG=IP@a@9F2}kK0TUhQ`K5Mo{ktyP7<{HSEp^ zDVZ3C7zA&WH5vk=Aut*OqaiS&LZFThR9AsWkIsMl1lLpa~3^umF%ew1GlDPh;5h z|9^;Y00XGqp$BVwh%qrq@N)9-@UU};iTxMi6=M3Ykyo0NqsaiJv~?AfF$@9;fW5=W z07(haB6{na*1DlnM-Oi14DpghzH2Cddc~@ z40@>*sSMa!bLYf2u-_BkKw`V`S^l$PP-}AyJLzyWI|!~}x3Tf_4R*J)V_*m}GcYjV z< Date: Sun, 30 Oct 2022 17:02:33 +0100 Subject: [PATCH 31/60] MDA. --- src/video/vid_mda.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/vid_mda.c b/src/video/vid_mda.c index d02670d6a..3c88c5ccd 100644 --- a/src/video/vid_mda.c +++ b/src/video/vid_mda.c @@ -163,6 +163,8 @@ mda_poll(void *p) buffer32->line[mda->displine][(x * 9) + c] ^= mdacols[attr][0][1]; } } + + video_process_8(mda->crtc[1] * 9, mda->displine); } mda->sc = oldsc; if (mda->vc == mda->crtc[7] && !mda->sc) { @@ -235,7 +237,7 @@ mda_poll(void *p) if (video_force_resize_get()) video_force_resize_set(0); } - video_blit_memtoscreen_8(0, mda->firstline, xsize, ysize); + video_blit_memtoscreen(0, mda->firstline, xsize, ysize); frames++; video_res_x = mda->crtc[1]; video_res_y = mda->crtc[6]; From a2e5c25333a10497b40d99273d468899c0f0a210 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 17:05:49 +0100 Subject: [PATCH 32/60] NGA. --- src/video/vid_nga.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/video/vid_nga.c b/src/video/vid_nga.c index 7710c3655..8b61cd83f 100644 --- a/src/video/vid_nga.c +++ b/src/video/vid_nga.c @@ -347,6 +347,14 @@ nga_poll(void *priv) } } + if ((nga->cga.cgamode & 1)) + /* set screen width */ + x = (nga->cga.crtc[1] << 3) + 16; + else + x = (nga->cga.crtc[1] << 4) + 16; + + video_process_8(x, nga->cga.displine); + nga->cga.sc = oldsc; /* vertical sync */ if (nga->cga.vc == nga->cga.crtc[7] && !nga->cga.sc) @@ -465,19 +473,11 @@ nga_poll(void *priv) } /* nga specific */ if (enable_overscan) { - if (nga->cga.composite) - video_blit_memtoscreen(0, (nga->cga.firstline - 8), - xsize, (nga->cga.lastline - nga->cga.firstline) + 16); - else - video_blit_memtoscreen_8(0, (nga->cga.firstline - 8), - xsize, (nga->cga.lastline - nga->cga.firstline) + 16); + video_blit_memtoscreen(0, (nga->cga.firstline - 8), + xsize, (nga->cga.lastline - nga->cga.firstline) + 16); } else { - if (nga->cga.composite) - video_blit_memtoscreen(8, nga->cga.firstline, - xsize, (nga->cga.lastline - nga->cga.firstline)); - else - video_blit_memtoscreen_8(8, nga->cga.firstline, - xsize, (nga->cga.lastline - nga->cga.firstline)); + video_blit_memtoscreen(8, nga->cga.firstline, + xsize, (nga->cga.lastline - nga->cga.firstline)); } } frames++; From 8fa09b318d181bb48877a83a35dfa2bb3fb76aa8 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 17:06:57 +0100 Subject: [PATCH 33/60] OGC. --- src/video/vid_ogc.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/video/vid_ogc.c b/src/video/vid_ogc.c index 20fe30cac..ea824c0f8 100644 --- a/src/video/vid_ogc.c +++ b/src/video/vid_ogc.c @@ -375,6 +375,9 @@ ogc_poll(void *priv) Composite_Process(ogc->cga.cgamode, border, x >> 2, buffer32->line[(ogc->cga.displine << 1)]); Composite_Process(ogc->cga.cgamode, border, x >> 2, buffer32->line[(ogc->cga.displine << 1) + 1]); + } else { + video_process_8(x, ogc->cga.displine << 1); + video_process_8(x, (ogc->cga.displine << 1) + 1); } ogc->cga.sc = oldsc; @@ -478,19 +481,11 @@ ogc_poll(void *priv) } /* ogc specific */ if (enable_overscan) { - if (ogc->cga.composite) - video_blit_memtoscreen(0, (ogc->cga.firstline - 8), - xsize, (ogc->cga.lastline - ogc->cga.firstline) + 16); - else - video_blit_memtoscreen_8(0, (ogc->cga.firstline - 8), - xsize, (ogc->cga.lastline - ogc->cga.firstline) + 16); + video_blit_memtoscreen(0, (ogc->cga.firstline - 8), + xsize, (ogc->cga.lastline - ogc->cga.firstline) + 16); } else { - if (ogc->cga.composite) - video_blit_memtoscreen(8, ogc->cga.firstline, - xsize, (ogc->cga.lastline - ogc->cga.firstline)); - else - video_blit_memtoscreen_8(8, ogc->cga.firstline, - xsize, (ogc->cga.lastline - ogc->cga.firstline)); + video_blit_memtoscreen(8, ogc->cga.firstline, + xsize, (ogc->cga.lastline - ogc->cga.firstline)); } } frames++; From 288394bb16c3aa907e75278abd059974669a4eeb Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 17:08:23 +0100 Subject: [PATCH 34/60] PGC. --- src/video/vid_pgc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/vid_pgc.c b/src/video/vid_pgc.c index 0decb8e65..089110d34 100644 --- a/src/video/vid_pgc.c +++ b/src/video/vid_pgc.c @@ -2457,6 +2457,8 @@ pgc_cga_poll(pgc_t *dev) hline(buffer32, 0, dev->displine, PGC_CGA_WIDTH, cols[0]); } + video_process_8(PGC_CGA_WIDTH, dev->displine); + if (++dev->displine == PGC_CGA_HEIGHT) { dev->mapram[0x3da] |= 8; dev->cgadispon = 0; @@ -2481,7 +2483,7 @@ pgc_cga_poll(pgc_t *dev) if (video_force_resize_get()) video_force_resize_set(0); } - video_blit_memtoscreen_8(0, 0, xsize, ysize); + video_blit_memtoscreen(0, 0, xsize, ysize); frames++; /* We have a fixed 640x400 screen for CGA modes. */ From 9658db159392c409b073f6d8a0dbc739a01a6337 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 17:10:17 +0100 Subject: [PATCH 35/60] Sigma. --- src/video/vid_sigma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/vid_sigma.c b/src/video/vid_sigma.c index bf6524439..5984d9bb0 100644 --- a/src/video/vid_sigma.c +++ b/src/video/vid_sigma.c @@ -650,6 +650,8 @@ sigma_poll(void *p) for (c = 0; c < x; c++) buffer32->line[sigma->displine][c] = sigma->palette[buffer32->line[sigma->displine][c] & 0xf] | 16; + video_process_8(x, sigma->displine); + sigma->sc = oldsc; if (sigma->vc == sigma->crtc[7] && !sigma->sc) sigma->sigmastat |= STATUS_RETR_V; @@ -729,7 +731,7 @@ sigma_poll(void *p) video_force_resize_set(0); } - video_blit_memtoscreen_8(0, sigma->firstline - 4, xsize, (sigma->lastline - sigma->firstline) + 8); + video_blit_memtoscreen(0, sigma->firstline - 4, xsize, (sigma->lastline - sigma->firstline) + 8); frames++; video_res_x = xsize - 16; From ef4a99cf2a31b079b825e78513021406c3d0bb8a Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 17:11:29 +0100 Subject: [PATCH 36/60] WYSE Wy700. --- src/video/vid_wy700.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/vid_wy700.c b/src/video/vid_wy700.c index 2478a5089..e492523db 100644 --- a/src/video/vid_wy700.c +++ b/src/video/vid_wy700.c @@ -785,6 +785,7 @@ wy700_poll(void *p) break; } } + video_process_8(WY700_XSIZE, wy700->displine); wy700->displine++; /* Hardcode a fixed refresh rate and VSYNC timing */ if (wy700->displine == 800) /* Start of VSYNC */ @@ -820,7 +821,7 @@ wy700_poll(void *p) if (video_force_resize_get()) video_force_resize_set(0); } - video_blit_memtoscreen_8(0, 0, xsize, ysize); + video_blit_memtoscreen(0, 0, xsize, ysize); frames++; /* Fixed 1280x800 resolution */ From 8f13bae92c958c83ff0d670eaacb6b7907bf2148 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 17:13:40 +0100 Subject: [PATCH 37/60] Removal of vid_blit_memtoscreen_8(). --- src/include/86box/video.h | 2 -- src/video/video.c | 21 --------------------- 2 files changed, 23 deletions(-) diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 2dd6f3627..91ef40eab 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -228,7 +228,6 @@ extern void video_blend(int x, int y); extern void video_blit_memtoscreen_8(int x, int y, int w, int h); extern void video_blend_monitor(int x, int y, int monitor_index); extern void video_process_8_monitor(int x, int y, int monitor_index); -extern void video_blit_memtoscreen_8_monitor(int x, int y, int w, int h, int monitor_index); extern void video_blit_memtoscreen_monitor(int x, int y, int w, int h, int monitor_index); extern void video_blit_complete_monitor(int monitor_index); extern void video_wait_for_blit_monitor(int monitor_index); @@ -264,7 +263,6 @@ extern uint32_t video_color_transform(uint32_t color); #define video_blend(x, y) video_blend_monitor(x, y, monitor_index_global) #define video_blit_memtoscreen(x, y, w, h) video_blit_memtoscreen_monitor(x, y, w, h, monitor_index_global) #define video_process_8(x, y) video_process_8_monitor(x, y, monitor_index_global) -#define video_blit_memtoscreen_8(x, y, w, h) video_blit_memtoscreen_8_monitor(x, y, w, h, monitor_index_global) #define video_blit_complete() video_blit_complete_monitor(monitor_index_global) #define video_wait_for_blit() video_wait_for_blit_monitor(monitor_index_global) #define video_wait_for_buffer() video_wait_for_buffer_monitor(monitor_index_global) diff --git a/src/video/video.c b/src/video/video.c index f6cf6623a..9fed77bf2 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -548,27 +548,6 @@ video_process_8_monitor(int x, int y, int monitor_index) } } -void -video_blit_memtoscreen_8_monitor(int x, int y, int w, int h, int monitor_index) -{ - int yy, xx; - - if ((w > 0) && (h > 0)) { - for (yy = 0; yy < h; yy++) { - if ((y + yy) >= 0 && (y + yy) < monitors[monitor_index].target_buffer->h) { - for (xx = 0; xx < w; xx++) { - if (monitors[monitor_index].target_buffer->line[y + yy][x + xx] <= 0xff) - monitors[monitor_index].target_buffer->line[y + yy][x + xx] = monitors[monitor_index].mon_pal_lookup[monitors[monitor_index].target_buffer->line[y + yy][x + xx]]; - else - monitors[monitor_index].target_buffer->line[y + yy][x + xx] = 0x00000000; - } - } - } - } - - video_blit_memtoscreen_monitor(x, y, w, h, monitor_index); -} - void cgapal_rebuild_monitor(int monitor_index) { From db626ea8729a3d4d7c41bd411b1228f3f7468c2a Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Sun, 30 Oct 2022 23:29:23 +0600 Subject: [PATCH 38/60] qt: force the screen output widget to be resizable --- src/qt/qt_mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 5b23a859f..d8c0825f4 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1544,6 +1544,7 @@ void MainWindow::on_actionFullscreen_triggered() { ui->menubar->hide(); ui->statusbar->hide(); ui->toolBar->hide(); + ui->stackedWidget->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); showFullScreen(); if (vid_api == 5) QTimer::singleShot(0, this, [this] () { ui->stackedWidget->switchRenderer(RendererStack::Renderer::Direct3D9); }); } From bac601c06ea47e13f295e5b548525ba381cc8ddb Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 18:32:12 +0100 Subject: [PATCH 39/60] Fixed AdLib MCA. --- src/sound/snd_adlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/snd_adlib.c b/src/sound/snd_adlib.c index d0624744f..2f69bbf9d 100644 --- a/src/sound/snd_adlib.c +++ b/src/sound/snd_adlib.c @@ -159,7 +159,7 @@ const device_t adlib_mca_device = { .internal_name = "adlib_mca", .flags = DEVICE_MCA, .local = 0, - .init = adlib_init, + .init = adlib_mca_init, .close = adlib_close, .reset = NULL, { .available = NULL }, From 6e62aabb4bd7efc2f43886429a6ea0a295ba2ead Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 31 Oct 2022 00:32:27 +0600 Subject: [PATCH 40/60] qt: make background of main window black --- src/qt/qt_mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index d8c0825f4..b213c7963 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -154,6 +154,7 @@ MainWindow::MainWindow(QWidget *parent) : ui->stackedWidget->setMouseTracking(true); statusBar()->setVisible(!hide_status_bar); statusBar()->setStyleSheet("QStatusBar::item {border: None; } QStatusBar QLabel { margin-right: 2px; margin-bottom: 1px; }"); + this->setStyleSheet("#centralWidget { background-color: black; }"); ui->toolBar->setVisible(!hide_tool_bar); renderers[0].reset(nullptr); auto toolbar_spacer = new QWidget(); From 419af5c5e5d61ad7ffb7796c9bd50662b42153a7 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 31 Oct 2022 00:50:58 +0600 Subject: [PATCH 41/60] qt: try another fix for the issue --- src/qt/qt_mainwindow.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index a91fd1f57..1f4c099fc 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include #include @@ -128,6 +130,15 @@ protected: void showEvent(QShowEvent* event) override; void closeEvent(QCloseEvent* event) override; void changeEvent(QEvent* event) override; + void paintEvent(QPaintEvent* event) override + { + QPainter painter(this); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + painter.fillRect(0, 0, this->width(), this->height() - statusBar()->height(), QColorConstants::Black); +#else + painter.fillRect(0, 0, this->width(), this->height() - statusBar()->height(), Qt::black); +#endif + } private slots: void on_actionShow_non_primary_monitors_triggered(); From c6d295992557f4b31337906f631dd548c029ac46 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 20:40:40 +0100 Subject: [PATCH 42/60] Reverted pull requestion no. 2775. --- src/qt/qt_mainwindow.hpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index 1664aa7c9..ef70a0826 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -5,8 +5,6 @@ #include #include #include -#include -#include #include #include @@ -130,15 +128,6 @@ protected: void showEvent(QShowEvent* event) override; void closeEvent(QCloseEvent* event) override; void changeEvent(QEvent* event) override; - void paintEvent(QPaintEvent* event) override - { - QPainter painter(this); -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) - painter.fillRect(0, 0, this->width(), this->height() - statusBar()->height(), QColorConstants::Black); -#else - painter.fillRect(0, 0, this->width(), this->height() - statusBar()->height(), Qt::black); -#endif - } private slots: void on_actionShow_non_primary_monitors_triggered(); From f5072abba5dd113dad3d1aabebdf6e13e816332a Mon Sep 17 00:00:00 2001 From: telanus Date: Sun, 30 Oct 2022 23:49:18 +0200 Subject: [PATCH 43/60] Added the Packard Bell PB8810 --- src/include/86box/machine.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index cf3a353b1..c8f2314c0 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -786,6 +786,7 @@ extern int machine_xt_top88_init(const machine_t *); extern int machine_xt_kaypropc_init(const machine_t *); extern int machine_xt_sansx16_init(const machine_t *); extern int machine_xt_bw230_init(const machine_t *); +extern int machine_xt_pb8810_init(const machine_t *); extern int machine_xt_v20xt_init(const machine_t *); From 0669cce5b5c244c38c99a0fee498d90f08e0f213 Mon Sep 17 00:00:00 2001 From: telanus Date: Sun, 30 Oct 2022 23:51:47 +0200 Subject: [PATCH 44/60] Added the Packard Bell PB8810 --- src/machine/machine_table.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 2f51d559f..4f8777875 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -1031,6 +1031,42 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + { + .name = "[8088] Packard Bell PB8810", + .internal_name = "pb8810", + .type = MACHINE_TYPE_8088, + .chipset = MACHINE_CHIPSET_DISCRETE, + .init = machine_xt_pb8810_init, + .pad = 0, + .pad0 = 0, + .pad1 = MACHINE_AVAILABLE, + .pad2 = 0, + .cpu = { + .package = CPU_PKG_8088, + .block = CPU_BLOCK_NONE, + .min_bus = 0, + .max_bus = 0, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 0, + .max_multi = 0 + }, + .bus_flags = MACHINE_PC, + .flags = MACHINE_FLAGS_NONE, + .ram = { + .min = 256, + .max = 640, + .step = 256 + }, + .nvrmask = 0, + .kbc = KBC_IBM_PC_XT, + .kbc_p1 = 0xff00, + .gpio = 0xffffffff, + .device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, { .name = "[8088] Philips P3105/NMS9100", .internal_name = "p3105", From 378bd8d8455972b51390f3a696f039a066f29a34 Mon Sep 17 00:00:00 2001 From: telanus Date: Sun, 30 Oct 2022 23:52:45 +0200 Subject: [PATCH 45/60] Added the Packard Bell PB8810 --- src/machine/m_xt.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index 167d2ec51..0aa0468fa 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -597,3 +597,19 @@ machine_xt_v20xt_init(const machine_t *model) return ret; } + +int +machine_xt_pb8810_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pb8810/pb8088-8810-633acc631aba0345517682.bin", + 0x000fc000, 16384, 0); + + if (bios_only || !ret) + return ret; + + machine_xt_clone_init(model); + + return ret; +} From ceadc67169ec1773781f774806121566e30266f7 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 23:08:15 +0100 Subject: [PATCH 46/60] Olivetti OGC fixes, fixes #2776. --- src/video/vid_ogc.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/src/video/vid_ogc.c b/src/video/vid_ogc.c index ea824c0f8..ad8794dfb 100644 --- a/src/video/vid_ogc.c +++ b/src/video/vid_ogc.c @@ -349,16 +349,12 @@ ogc_poll(void *priv) } } } else { - /* ogc specific */ cols[0] = ((ogc->cga.cgamode & 0x12) == 0x12) ? 0 : (ogc->cga.cgacol & 15) + 16; - if (ogc->cga.cgamode & 1) { - hline(buffer32, 0, (ogc->cga.displine << 1), ((ogc->cga.crtc[1] << 3) + 16) << 2, cols[0]); - hline(buffer32, 0, (ogc->cga.displine << 1) + 1, ((ogc->cga.crtc[1] << 3) + 16) << 2, cols[0]); - } else { - hline(buffer32, 0, (ogc->cga.displine << 1), ((ogc->cga.crtc[1] << 4) + 16) << 2, cols[0]); - hline(buffer32, 0, (ogc->cga.displine << 1) + 1, ((ogc->cga.crtc[1] << 4) + 16) << 2, cols[0]); - } + if (ogc->cga.cgamode & 1) + hline(buffer32, 0, ogc->cga.displine, ((ogc->cga.crtc[1] << 3) + 16) << 2, cols[0]); + else + hline(buffer32, 0, ogc->cga.displine, ((ogc->cga.crtc[1] << 4) + 16) << 2, cols[0]); } /* 80 columns */ @@ -367,18 +363,7 @@ ogc_poll(void *priv) else x = (ogc->cga.crtc[1] << 4) + 16; - if (ogc->cga.composite) { - if (ogc->cga.cgamode & 0x10) - border = 0x00; - else - border = ogc->cga.cgacol & 0x0f; - - Composite_Process(ogc->cga.cgamode, border, x >> 2, buffer32->line[(ogc->cga.displine << 1)]); - Composite_Process(ogc->cga.cgamode, border, x >> 2, buffer32->line[(ogc->cga.displine << 1) + 1]); - } else { - video_process_8(x, ogc->cga.displine << 1); - video_process_8(x, (ogc->cga.displine << 1) + 1); - } + video_process_8(x, ogc->cga.displine); ogc->cga.sc = oldsc; if (ogc->cga.vc == ogc->cga.crtc[7] && !ogc->cga.sc) From e9cf6dc26966589c2bffbad3b5c275cae6673efd Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 30 Oct 2022 23:11:59 +0100 Subject: [PATCH 47/60] Fixed a newly introduced warning in video/vid_ogc.c. --- src/video/vid_ogc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/video/vid_ogc.c b/src/video/vid_ogc.c index ad8794dfb..f5e5c1911 100644 --- a/src/video/vid_ogc.c +++ b/src/video/vid_ogc.c @@ -196,7 +196,6 @@ ogc_poll(void *priv) int oldsc; int blink = 0; int underline = 0; - uint8_t border; // composito colore appare blu scuro From a588fa8c0ae0a3aa42b4760784342f7c29432e85 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 31 Oct 2022 02:13:20 +0100 Subject: [PATCH 48/60] Assorted CD-ROM fixes, including for the READ CD command on a data sector on an ATAPI, fixes MTMCDAI.SYS when used with the Acer CPR CD. --- src/scsi/scsi_cdrom.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/scsi/scsi_cdrom.c b/src/scsi/scsi_cdrom.c index b23782278..b7bf4fcfe 100644 --- a/src/scsi/scsi_cdrom.c +++ b/src/scsi/scsi_cdrom.c @@ -541,6 +541,7 @@ static void scsi_cdrom_update_request_length(scsi_cdrom_t *dev, int len, int block_len) { int32_t bt, min_len = 0; + double dlen; dev->max_transfer_len = dev->request_length; @@ -589,6 +590,16 @@ scsi_cdrom_update_request_length(scsi_cdrom_t *dev, int len, int block_len) else if (len > dev->max_transfer_len) dev->request_length = dev->max_transfer_len; + /* READ CD MSF and READ CD: Round the request length to the sector size - the device must ensure + that a media access comand does not DRQ in the middle of a sector. One of the drivers that + relies on the correctness of this behavior is MTMCDAI.SYS (the Mitsumi CD-ROM driver) for DOS + which uses the READ CD command to read data on some CD types. */ + if (dev->current_cdb[0] == 0xb9) || (dev->current_cdb[0] == 0xbe) { + /* Round to sector length. */ + dlen = ((double) dev->request_length) / ((double) block_len); + dev->request_length = ((uint16_t) floor(dlen)) * block_len; + } + return; } @@ -1011,8 +1022,8 @@ scsi_cdrom_read_blocks(scsi_cdrom_t *dev, int32_t *len, int first_batch) if (ret == -1) return 0; - else if (!ret || ((dev->old_len != *len) && !first_batch)) { - if ((dev->old_len != *len) && !first_batch) + else if (!ret || (!first_batch && (dev->old_len != *len))) { + if (!first_batch && (dev->old_len != *len)) scsi_cdrom_illegal_mode(dev); return 0; @@ -2716,8 +2727,13 @@ scsi_cdrom_identify(ide_t *ide, int ide_has_dma) ide_padstr((char *) (ide->buffer + 27), device_identify, 40); /* Model */ #else if (dev->early) { +#ifdef WRONG ide_padstr((char *) (ide->buffer + 23), "1.01 ", 8); /* Firmware */ ide_padstr((char *) (ide->buffer + 27), "NEC CD-ROM DRIVE:260 ", 40); /* Model */ +#else + ide_padstr((char *) (ide->buffer + 23), ".110 ", 8); /* Firmware */ + ide_padstr((char *) (ide->buffer + 27), "EN C DCR-MOD IREV2:06 ", 40); /* Model */ +#endif } else { ide_padstr((char *) (ide->buffer + 23), "0020 ", 8); /* Firmware */ ide_padstr((char *) (ide->buffer + 27), "HITACHI CDR-8130 ", 40); /* Model */ From 65fc4e989d5cfb452051ee26118ac952cb55bb8c Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 31 Oct 2022 03:24:09 +0100 Subject: [PATCH 49/60] Some fixes and implemented the --image/-I command line parameter to load an image to the specified floppy drive. --- src/86box.c | 40 +++++++++++++++++++++++++++++++++++++++- src/scsi/scsi_cdrom.c | 3 ++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/86box.c b/src/86box.c index 19465a17f..6e8fa52dd 100644 --- a/src/86box.c +++ b/src/86box.c @@ -403,10 +403,12 @@ pc_init(int argc, char *argv[]) { char *ppath = NULL, *rpath = NULL; char *cfg = NULL, *p; - char temp[2048]; + char temp[2048], *fn[FDD_NUM] = { NULL }; + char drive = 0, *temp2 = NULL; struct tm *info; time_t now; int c, lvmp = 0; + int i; #ifdef ENABLE_NG int ng = 0; #endif @@ -456,6 +458,13 @@ pc_init(int argc, char *argv[]) if (!strcasecmp(argv[c], "--help") || !strcasecmp(argv[c], "-?")) { usage: + for (i = 0; i < FDD_NUM; i++) { + if (fn[i] != NULL) { + free(fn[i]); + fn[i] = NULL; + } + } + printf("\nUsage: 86box [options] [cfg-file]\n\n"); printf("Valid options are:\n\n"); printf("-? or --help - show this information\n"); @@ -471,6 +480,7 @@ usage: #ifdef _WIN32 printf("-H or --hwnd id,hwnd - sends back the main dialog's hwnd\n"); #endif + printf("-I or --image d:path - load 'path' as floppy image on drive d\n"); printf("-L or --logfile path - set 'path' to be the logfile\n"); printf("-N or --noconfirm - do not ask for confirmation on quit\n"); printf("-O or --dumpcfg - dump config file after loading\n"); @@ -519,6 +529,25 @@ usage: goto usage; cfg = argv[++c]; + } else if (!strcasecmp(argv[c], "--image") || !strcasecmp(argv[c], "-I")) { + if ((c + 1) == argc) + goto usage; + + temp2 = (char *) calloc(2048, 1); + sscanf(argv[++c], "%c:%s", &drive, temp2); + if (drive > 0x40) + drive = (drive & 0x1f) - 1; + else + drive = drive & 0x1f; + if (drive < 0) + drive = 0; + if (drive >= FDD_NUM) + drive = FDD_NUM - 1; + fn[(int) drive] = (char *) calloc(2048, 1); + strcpy(fn[(int) drive], temp2); + pclog("Drive %c: %s\n", drive + 0x41, fn[(int) drive]); + free(temp2); + temp2 = NULL; } else if (!strcasecmp(argv[c], "--vmname") || !strcasecmp(argv[c], "-V")) { if ((c + 1) == argc) goto usage; @@ -738,6 +767,15 @@ usage: /* Load the configuration file. */ config_load(); + for (i = 0; i < FDD_NUM; i++) { + if (fn[i] != NULL) { + if (strlen(fn[i]) <= 511) + strncpy(floppyfns[i], fn[i], 511); + free(fn[i]); + fn[i] = NULL; + } + } + /* Load the desired language */ if (lang_init) lang_id = lang_init; diff --git a/src/scsi/scsi_cdrom.c b/src/scsi/scsi_cdrom.c index b7bf4fcfe..c004a8044 100644 --- a/src/scsi/scsi_cdrom.c +++ b/src/scsi/scsi_cdrom.c @@ -17,6 +17,7 @@ */ #include #include +#include #include #include #include @@ -594,7 +595,7 @@ scsi_cdrom_update_request_length(scsi_cdrom_t *dev, int len, int block_len) that a media access comand does not DRQ in the middle of a sector. One of the drivers that relies on the correctness of this behavior is MTMCDAI.SYS (the Mitsumi CD-ROM driver) for DOS which uses the READ CD command to read data on some CD types. */ - if (dev->current_cdb[0] == 0xb9) || (dev->current_cdb[0] == 0xbe) { + if ((dev->current_cdb[0] == 0xb9) || (dev->current_cdb[0] == 0xbe)) { /* Round to sector length. */ dlen = ((double) dev->request_length) / ((double) block_len); dev->request_length = ((uint16_t) floor(dlen)) * block_len; From 90f67ee4fb8375c968145fb278250afd5e2b206d Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 31 Oct 2022 03:35:50 +0100 Subject: [PATCH 50/60] Fullscreen stretch mode now defaults to 4:3, closes #2146. --- src/config.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 2c20131c3..11c8bdf50 100644 --- a/src/config.c +++ b/src/config.c @@ -115,7 +115,7 @@ load_general(void) vid_api = plat_vidapi(p); ini_section_delete_var(cat, "vid_api"); - video_fullscreen_scale = ini_section_get_int(cat, "video_fullscreen_scale", 0); + video_fullscreen_scale = ini_section_get_int(cat, "video_fullscreen_scale", 1); video_fullscreen_first = ini_section_get_int(cat, "video_fullscreen_first", 1); @@ -1817,6 +1817,7 @@ config_load(void) vid_api = plat_vidapi("default"); vid_resize = 0; video_fullscreen_first = 1; + video_fullscreen_scale = 1; time_sync = TIME_SYNC_ENABLED; hdc_current = hdc_get_from_internal_name("none"); @@ -1904,7 +1905,7 @@ save_general(void) else ini_section_set_string(cat, "vid_renderer", va_name); - if (video_fullscreen_scale == 0) + if (video_fullscreen_scale == 1) ini_section_delete_var(cat, "video_fullscreen_scale"); else ini_section_set_int(cat, "video_fullscreen_scale", video_fullscreen_scale); From fb8dcab3bd415886e56defe36d704249b23e2570 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 31 Oct 2022 04:04:47 +0100 Subject: [PATCH 51/60] Fixed the handling of the Toshiba Fn keys, fixes #2778. --- src/device/keyboard.c | 8 ++++---- src/device/keyboard_at.c | 2 +- src/device/keyboard_xt.c | 2 +- src/include/86box/keyboard.h | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/device/keyboard.c b/src/device/keyboard.c index ef3dafb11..7d35d41cb 100644 --- a/src/device/keyboard.c +++ b/src/device/keyboard.c @@ -140,10 +140,10 @@ keyboard_input(int down, uint16_t scan) if (recv_key[scan & 0x1ff] ^ down) { if (down) { switch (scan & 0x1ff) { - case 0x01c: /* Left Ctrl */ + case 0x01d: /* Left Ctrl */ shift |= 0x01; break; - case 0x11c: /* Right Ctrl */ + case 0x11d: /* Right Ctrl */ shift |= 0x10; break; case 0x02a: /* Left Shift */ @@ -161,10 +161,10 @@ keyboard_input(int down, uint16_t scan) } } else { switch (scan & 0x1ff) { - case 0x01c: /* Left Ctrl */ + case 0x01d: /* Left Ctrl */ shift &= ~0x01; break; - case 0x11c: /* Right Ctrl */ + case 0x11d: /* Right Ctrl */ shift &= ~0x10; break; case 0x02a: /* Left Shift */ diff --git a/src/device/keyboard_at.c b/src/device/keyboard_at.c index e808f9507..682d28e1c 100644 --- a/src/device/keyboard_at.c +++ b/src/device/keyboard_at.c @@ -866,7 +866,7 @@ add_data_kbd(uint16_t val) } /* Test for T3100E 'Fn' key (Right Alt / Right Ctrl) */ - if ((dev != NULL) && (kbc_ven == KBC_VEN_TOSHIBA) && (keyboard_recv(0xb8) || keyboard_recv(0x9d))) + if ((dev != NULL) && (kbc_ven == KBC_VEN_TOSHIBA) && (keyboard_recv(0x138) || keyboard_recv(0x11d))) switch (val) { case 0x4f: t3100e_notify_set(0x01); diff --git a/src/device/keyboard_xt.c b/src/device/keyboard_xt.c index bd9a9e1c7..dc282e8a6 100644 --- a/src/device/keyboard_xt.c +++ b/src/device/keyboard_xt.c @@ -429,7 +429,7 @@ kbd_adddata(uint16_t val) { /* Test for T1000 'Fn' key (Right Alt / Right Ctrl) */ if (is_t1x00) { - if (keyboard_recv(0xb8) || keyboard_recv(0x9d)) { /* 'Fn' pressed */ + if (keyboard_recv(0x138) || keyboard_recv(0x11d)) { /* 'Fn' pressed */ t1000_syskey(0x00, 0x04, 0x00); /* Set 'Fn' indicator */ switch (val) { case 0x45: /* Num Lock => toggle numpad */ diff --git a/src/include/86box/keyboard.h b/src/include/86box/keyboard.h index 008d5b95c..0e384b39b 100644 --- a/src/include/86box/keyboard.h +++ b/src/include/86box/keyboard.h @@ -150,6 +150,7 @@ extern const device_t keyboard_pravetz_device; extern const device_t keyboard_xt_device; extern const device_t keyboard_xt86_device; extern const device_t keyboard_xt_compaq_device; +extern const device_t keyboard_xt_t1x00_device; extern const device_t keyboard_tandy_device; # if defined(DEV_BRANCH) && defined(USE_LASERXT) extern const device_t keyboard_xt_lxt3_device; From 021eb600bb98fa0cca96f7a26adfeb9aca1d49ee Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 31 Oct 2022 05:42:32 +0100 Subject: [PATCH 52/60] Forgotten T1000 part of the Fn fix. --- src/machine/m_xt_t1000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/machine/m_xt_t1000.c b/src/machine/m_xt_t1000.c index 7e55766df..51d23da40 100644 --- a/src/machine/m_xt_t1000.c +++ b/src/machine/m_xt_t1000.c @@ -888,7 +888,7 @@ machine_xt_t1000_init(const machine_t *model) machine_common_init(model); pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - device_add(&keyboard_xt_device); + device_add(&keyboard_xt_t1x00_device); t1000.fdc = device_add(&fdc_xt_device); nmi_init(); @@ -948,7 +948,7 @@ machine_xt_t1200_init(const machine_t *model) NULL, MEM_MAPPING_EXTERNAL, &t1000); pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - device_add(&keyboard_xt_device); + device_add(&keyboard_xt_t1x00_device); t1000.fdc = device_add(&fdc_xt_t1x00_device); nmi_init(); From 015283e5dba25ee34b9f62b51398b653bc3a8d4c Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 31 Oct 2022 05:44:32 +0100 Subject: [PATCH 53/60] Preliminary OPTi 822 rewrite. --- src/chipset/opti5x7.c | 36 +++- src/chipset/opti822.c | 379 +++++++++++++++++++++-------------- src/chipset/opti895.c | 32 ++- src/include/86box/chipset.h | 2 + src/machine/m_at_386dx_486.c | 2 +- src/machine/m_at_socket4.c | 2 +- src/machine/m_at_socket5.c | 2 +- 7 files changed, 288 insertions(+), 167 deletions(-) diff --git a/src/chipset/opti5x7.c b/src/chipset/opti5x7.c index d85ed4f54..76989481e 100644 --- a/src/chipset/opti5x7.c +++ b/src/chipset/opti5x7.c @@ -34,7 +34,8 @@ typedef struct { - uint8_t idx, regs[16]; + uint8_t idx, is_pci, + regs[16]; } opti5x7_t; #ifdef ENABLE_OPTI5X7_LOG @@ -75,11 +76,20 @@ opti5x7_shadow_map(int cur_reg, opti5x7_t *dev) 0 1 Read from DRAM (write protected) */ if (cur_reg == 0x06) { - mem_set_mem_state_both(0xe0000, 0x10000, ((dev->regs[6] & 1) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) | ((dev->regs[6] & 2) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY)); - mem_set_mem_state_both(0xf0000, 0x10000, ((dev->regs[6] & 4) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) | ((dev->regs[6] & 8) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY)); + if (dev->is_pci) { + mem_set_mem_state_cpu_both(0xe0000, 0x10000, ((dev->regs[6] & 1) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) | ((dev->regs[6] & 2) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY)); + mem_set_mem_state_cpu_both(0xf0000, 0x10000, ((dev->regs[6] & 4) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) | ((dev->regs[6] & 8) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY)); + } else { + mem_set_mem_state_both(0xe0000, 0x10000, ((dev->regs[6] & 1) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) | ((dev->regs[6] & 2) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY)); + mem_set_mem_state_both(0xf0000, 0x10000, ((dev->regs[6] & 4) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) | ((dev->regs[6] & 8) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY)); + } } else { - for (int i = 0; i < 4; i++) - mem_set_mem_state_both(0xc0000 + ((cur_reg & 1) << 16) + (i << 14), 0x4000, ((dev->regs[cur_reg] & (1 << (2 * i))) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) | ((dev->regs[cur_reg] & (2 << (2 * i))) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY)); + for (int i = 0; i < 4; i++) { + if (dev->is_pci) + mem_set_mem_state_cpu_both(0xc0000 + ((cur_reg & 1) << 16) + (i << 14), 0x4000, ((dev->regs[cur_reg] & (1 << (2 * i))) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) | ((dev->regs[cur_reg] & (2 << (2 * i))) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY)); + else + mem_set_mem_state_both(0xc0000 + ((cur_reg & 1) << 16) + (i << 14), 0x4000, ((dev->regs[cur_reg] & (1 << (2 * i))) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) | ((dev->regs[cur_reg] & (2 << (2 * i))) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY)); + } } flushmmucache_nopc(); @@ -161,6 +171,8 @@ opti5x7_init(const device_t *info) opti5x7_t *dev = (opti5x7_t *) malloc(sizeof(opti5x7_t)); memset(dev, 0, sizeof(opti5x7_t)); + dev->is_pci = info->local; + io_sethandler(0x0022, 0x0001, opti5x7_read, NULL, NULL, opti5x7_write, NULL, NULL, dev); io_sethandler(0x0024, 0x0001, opti5x7_read, NULL, NULL, opti5x7_write, NULL, NULL, dev); @@ -182,3 +194,17 @@ const device_t opti5x7_device = { .force_redraw = NULL, .config = NULL }; + +const device_t opti5x7_pci_device = { + .name = "OPTi 82C5x6/82C5x7 (PCI)", + .internal_name = "opti5x7_pci", + .flags = 0, + .local = 1, + .init = opti5x7_init, + .close = opti5x7_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; diff --git a/src/chipset/opti822.c b/src/chipset/opti822.c index ec8ce699e..20f0e8a67 100644 --- a/src/chipset/opti822.c +++ b/src/chipset/opti822.c @@ -6,14 +6,15 @@ * * This file is part of the 86Box distribution. * - * Implementation of the OPTi 82C822 VESA Local Bus to PCI Bridge Interface. + * Implementation of the OPTi 82C822 VESA Local Bus to PCI + * Bridge Interface. * * - * Authors: Tiseno100, * - * Copyright 2021 Tiseno100. + * Authors: Miran Grca, + * + * Copyright 2022 Miran Grca. */ - #include #include #include @@ -22,283 +23,349 @@ #include #define HAVE_STDARG_H #include <86box/86box.h> -#include "cpu.h" -#include <86box/timer.h> -#include <86box/io.h> #include <86box/device.h> - +#include <86box/io.h> +#include <86box/apm.h> +#include <86box/dma.h> #include <86box/mem.h> +#include <86box/smram.h> #include <86box/pci.h> - +#include <86box/timer.h> +#include <86box/pic.h> +#include <86box/pit.h> +#include <86box/port_92.h> +#include <86box/hdc_ide.h> +#include <86box/hdc.h> +#include <86box/machine.h> #include <86box/chipset.h> +#include <86box/spd.h> -/* Shadow RAM */ -#define SYSTEM_READ ((dev->pci_conf[0x44] & 2) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) -#define SYSTEM_WRITE ((dev->pci_conf[0x44] & 1) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY) -#define SHADOW_READ ((dev->pci_conf[cur_reg] & (1 << (4 + i))) ? MEM_READ_INTERNAL : MEM_READ_EXTANY) -#define SHADOW_WRITE ((dev->pci_conf[cur_reg] & (1 << i)) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY) +#define MEM_STATE_SHADOW_R 0x01 +#define MEM_STATE_SHADOW_W 0x02 +#define MEM_STATE_SMRAM 0x04 + + +typedef struct +{ + uint8_t irq_convert, + pci_regs[256]; +} opti822_t; + + +#define ENABLE_OPTI822_LOG 1 #ifdef ENABLE_OPTI822_LOG int opti822_do_log = ENABLE_OPTI822_LOG; + static void opti822_log(const char *fmt, ...) { va_list ap; if (opti822_do_log) { - va_start(ap, fmt); - pclog_ex(fmt, ap); - va_end(ap); + va_start(ap, fmt); + pclog_ex(fmt, ap); + va_end(ap); } } #else -# define opti822_log(fmt, ...) +#define opti822_log(fmt, ...) #endif -typedef struct opti822_t { - uint8_t pci_conf[256]; -} opti822_t; -int opti822_irq_routing[7] = { 5, 9, 0x0a, 0x0b, 0x0c, 0x0e, 0x0f }; - -void -opti822_shadow(int cur_reg, opti822_t *dev) +/* NOTE: We cheat here. The real ALi M1435 uses a level to edge triggered IRQ converter + when the most siginificant bit is set. We work around that by manipulating the + emulated PIC's ELCR register. */ +static void +opti822_update_irqs(opti822_t *dev, int set) { - if (cur_reg == 0x44) - mem_set_mem_state_both(0xf0000, 0x10000, SYSTEM_READ | SYSTEM_WRITE); - else - for (int i = 0; i < 4; i++) - mem_set_mem_state_both(0xe0000 - (((cur_reg & 3) - 1) << 16) + (i << 14), 0x4000, SHADOW_READ | SHADOW_WRITE); + uint8_t val; + int i, reg; + int shift, irq; + int irq_map[8] = { -1, 5, 9, 10, 11, 12, 14, 15 }; + pic_t *temp_pic; - flushmmucache_nopc(); + dev->irq_convert = (dev->pci_regs[0x53] & 0x08); + + for (i = 0; i < 4; i++) { + reg = 0x80 + (i >> 1); + shift = (i & 1) << 2; + val = (dev->pci_regs[reg] >> shift) & 0x0f; + irq = irq_map[val & 0x07]; + if (irq == -1) + continue; + temp_pic = (irq >= 8) ? &pic2 : &pic; + irq &= 7; + if (dev->irq_convert && set && (val & 0x08)) + temp_pic->elcr |= (1 << irq); + else + temp_pic->elcr &= ~(1 << irq); + } } + static void -opti822_write(int func, int addr, uint8_t val, void *priv) +opti822_pci_write(int func, int addr, uint8_t val, void *priv) { - opti822_t *dev = (opti822_t *) priv; + int irq, irq_map[8] = { -1, 5, 9, 10, 11, 12, 14, 15 }; - switch (func) { - case 0x04: /* Command Register */ - dev->pci_conf[addr] = val & 0x40; + opti822_log("opti822_write(%02X, %02X, %02X)\n", func, addr, val); + + if (func > 0) + return; + + switch (addr) { + /* Command Register */ + case 0x04: + dev->pci_regs[addr] = (val & 0x40) | 0x07; break; - case 0x05: /* Command Register */ - dev->pci_conf[addr] = val & 1; + /* Status Register */ + case 0x06: + if (!(dev->pci_regs[0x52] & 0x04)) + dev->pci_regs[addr] = (val & 0x80); + break; + case 0x07: + dev->pci_regs[addr] &= ~(val & 0xf9); break; - case 0x06: /* Status Register */ - dev->pci_conf[addr] |= val & 0xc0; - break; - - case 0x07: /* Status Register */ - dev->pci_conf[addr] = val & 0xa9; + /* Master Latency Timer Register */ + case 0x0d: + dev->pci_regs[addr] = val; break; case 0x40: - dev->pci_conf[addr] = val & 0xc0; + dev->pci_regs[addr] = (val & 0xc0) | 0x01; break; - case 0x41: - dev->pci_conf[addr] = val & 0xcf; + /* TODO: Bit 15th enable the PCI Bridge when 1. */ + dev->pci_regs[addr] = val & 0xcf; break; case 0x42: - dev->pci_conf[addr] = val & 0xf8; + dev->pci_regs[addr] = val & 0xf8; break; - case 0x43: - dev->pci_conf[addr] = val; + dev->pci_regs[addr] = val; break; - case 0x44: /* Shadow RAM */ + /* TODO: We do not currently allow separate shadow RAM mapping for PCI. */ case 0x45: + dev->pci_regs[addr] = val; + break; case 0x46: + dev->pci_regs[addr] = val; + break; case 0x47: - dev->pci_conf[addr] = (addr == 0x44) ? (val & 0xcb) : val; - opti822_shadow(addr, dev); + dev->pci_regs[addr] = val; + break; + + /* Memory hole stuff. */ + case 0x48 ... 0x51: + dev->pci_regs[addr] = val; break; - case 0x48: - case 0x49: - case 0x4a: - case 0x4b: - case 0x4c: - case 0x4d: - case 0x4e: - case 0x4f: - case 0x50: - case 0x51: case 0x52: + dev->pci_regs[addr] = val; + break; + case 0x53: - case 0x54: - case 0x55: - case 0x56: - case 0x57: - dev->pci_conf[addr] = val; + dev->pci_regs[addr] = val; + opti822_update_irqs(dev, 0); + opti822_update_irqs(dev, 1); + break; + + case 0x54 ... 0x57: + dev->pci_regs[addr] = val; break; case 0x58: - dev->pci_conf[addr] = val & 0xfc; + dev->pci_regs[addr] = val & 0xfc; + break; + case 0x59 ... 0x5b: + dev->pci_regs[addr] = val; break; - case 0x59: - case 0x5a: - case 0x5b: - case 0x5c: - case 0x5d: - case 0x5e: - case 0x5f: - dev->pci_conf[addr] = val; + case 0x5c ... 0x5f: + dev->pci_regs[addr] = val; break; case 0x60: - dev->pci_conf[addr] = val & 0xfc; + dev->pci_regs[addr] = val & 0xfc; + break; + case 0x61 ... 0x63: + dev->pci_regs[addr] = val; break; - case 0x61: - case 0x62: - case 0x63: - case 0x64: - case 0x65: - case 0x66: - case 0x67: - dev->pci_conf[addr] = val; + case 0x64 ... 0x67: + dev->pci_regs[addr] = val; break; case 0x68: - dev->pci_conf[addr] = val & 0xfc; + dev->pci_regs[addr] = val & 0xfc; + break; + case 0x69 ... 0x6b: + dev->pci_regs[addr] = val; break; - case 0x69: - case 0x6a: - case 0x6b: - case 0x6c: - case 0x6d: - case 0x6e: - case 0x6f: - dev->pci_conf[addr] = val; + case 0x6c ... 0x6f: + dev->pci_regs[addr] = val; break; case 0x70: - dev->pci_conf[addr] = val & 0xfc; + dev->pci_regs[addr] = val & 0xfc; break; - - case 0x71: - case 0x72: - case 0x73: - dev->pci_conf[addr] = val; + case 0x71 ... 0x73: + dev->pci_regs[addr] = val; break; case 0x74: - dev->pci_conf[addr] = val & 0xfc; + dev->pci_regs[addr] = val & 0xf8; break; + /* ROMCS# and NVMCS# stuff. */ case 0x75: + dev->pci_regs[addr] = val; + break; + case 0x76: - dev->pci_conf[addr] = val; + dev->pci_regs[addr] = val; break; case 0x77: - dev->pci_conf[addr] = val & 0xe7; + dev->pci_regs[addr] = val; break; + /* Enabling of memory blocks at ISA bus. */ case 0x78: - dev->pci_conf[addr] = val; + dev->pci_regs[addr] = val; break; - case 0x79: - dev->pci_conf[addr] = val & 0xfc; + dev->pci_regs[addr] = val & 0xfc; break; case 0x7a: - case 0x7b: - case 0x7c: - case 0x7d: - case 0x7e: - dev->pci_conf[addr] = val; + dev->pci_regs[addr] = val; + break; + + case 0x7b ... 0x7c: + dev->pci_regs[addr] = val; + break; + + case 0x7d ... 0x7e: + dev->pci_regs[addr] = val; break; case 0x7f: - dev->pci_conf[addr] = val & 3; + dev->pci_regs[addr] = val & 0x03; break; - case 0x80: - case 0x81: + case 0x80 ... 0x81: + dev->pci_regs[addr] = val; + break; case 0x82: - case 0x84: - case 0x85: + dev->pci_regs[addr] = val; + break; + + case 0x84 ... 0x85: + dev->pci_regs[addr] = val; + break; case 0x86: - dev->pci_conf[addr] = val; + dev->pci_regs[addr] = val; break; - case 0x88: /* PCI IRQ Routing */ - case 0x89: /* Very hacky implementation. Needs surely a rewrite after */ - case 0x8a: /* a PCI rework happens. */ - case 0x8b: - case 0x8c: - case 0x8d: - case 0x8e: - case 0x8f: - dev->pci_conf[addr] = val; - if (addr % 2) { - pci_set_irq_routing(PCI_INTB, ((val & 0x0f) != 0) ? opti822_irq_routing[(val & 7) - 1] : PCI_IRQ_DISABLED); - pci_set_irq_routing(PCI_INTA, (((val >> 4) & 0x0f) != 0) ? opti822_irq_routing[((val >> 4) & 7) - 1] : PCI_IRQ_DISABLED); - } else { - pci_set_irq_routing(PCI_INTD, ((val & 0x0f) != 0) ? opti822_irq_routing[(val & 7) - 1] : PCI_IRQ_DISABLED); - pci_set_irq_routing(PCI_INTC, (((val >> 4) & 0x0f) != 0) ? opti822_irq_routing[((val >> 4) & 7) - 1] : PCI_IRQ_DISABLED); - } - break; + case 0x88 ... 0x8f: + dev->pci_regs[addr] = val; + opti822_update_irqs(dev, 0); + irq = irq_map[val & 0x07]; + if (irq >= 0) { + opti822_log("Set IRQ routing: INT %c%c -> %02X\n", 0x41 + ((addr & 0x01) << 1), ((addr & 0x06) >> 1) + 1, irq); + pci_set_irq_routing(PCI_INTA + ((addr & 0x07) << 1), irq); + } else { + opti822_log("Set IRQ routing: INT %c%c -> FF\n", 0x41 + ((addr & 0x01) << 1), ((addr & 0x06) >> 1) + 1); + pci_set_irq_routing(PCI_INTA + ((addr & 0x07) << 1), PCI_IRQ_DISABLED); + } + irq = irq_map[(val >> 4) & 0x07]; + if (irq >= 0) { + opti822_log("Set IRQ routing: INT %c%c -> %02X\n", 0x42 + ((addr & 0x01) << 1), ((addr & 0x06) >> 1) + 1, irq); + pci_set_irq_routing(PCI_INTB + ((addr & 0x07) << 1), irq); + } else { + opti822_log("Set IRQ routing: INT %c%c -> FF\n", 0x42 + ((addr & 0x01) << 1), ((addr & 0x06) >> 1) + 1); + pci_set_irq_routing(PCI_INTB + ((addr & 0x07) << 1), PCI_IRQ_DISABLED); + } + opti822_update_irqs(dev, 1); + break; } - - opti822_log("OPTI822: dev->pci_conf[%02x] = %02x\n", addr, dev->pci_conf[addr]); } + static uint8_t -opti822_read(int func, int addr, void *priv) +opti822_pci_read(int func, int addr, void *priv) { opti822_t *dev = (opti822_t *) priv; - return dev->pci_conf[addr]; + uint8_t ret; + + ret = 0xff; + + if (func == 0) + ret = dev->pci_regs[addr]; + + opti822_log("opti822_read(%02X, %02X) = %02X\n", func, addr, ret); + + return ret; } + static void opti822_reset(void *priv) { opti822_t *dev = (opti822_t *) priv; - dev->pci_conf[0x00] = 0x45; - dev->pci_conf[0x01] = 0x10; - dev->pci_conf[0x02] = 0x22; - dev->pci_conf[0x03] = 0xc8; - dev->pci_conf[0x04] = 7; - dev->pci_conf[0x06] = 0x40; - dev->pci_conf[0x07] = 1; - dev->pci_conf[0x08] = 1; - dev->pci_conf[0x0b] = 6; - dev->pci_conf[0x0d] = 0x20; - dev->pci_conf[0x40] = 1; - dev->pci_conf[0x43] = 0x20; - dev->pci_conf[0x52] = 6; - dev->pci_conf[0x53] = 0x90; + pci_set_pmc(0); + + memset(dev->pci_regs, 0, 256); + + dev->pci_regs[0x00] = 0x45; dev->pci_regs[0x01] = 0x10; /*OPTi*/ + dev->pci_regs[0x02] = 0x22; dev->pci_regs[0x03] = 0xc8; /*82C822 PCIB*/ + dev->pci_regs[0x04] = 0x07; + dev->pci_regs[0x06] = 0x80; + dev->pci_regs[0x07] = 0x02; + dev->pci_regs[0x08] = 0x01; + dev->pci_regs[0x0b] = 0x06; + dev->pci_regs[0x0d] = 0x20; + + dev->pci_regs[0x40] = 0x01; dev->pci_regs[0x41] = 0x0c; + dev->pci_regs[0x43] = 0x02; + dev->pci_regs[0x52] = 0x06; + dev->pci_regs[0x53] = 0x90; + + dev->irq_convert = 0; + + pci_set_irq_routing(PCI_INTA, PCI_IRQ_DISABLED); + pci_set_irq_routing(PCI_INTB, PCI_IRQ_DISABLED); + pci_set_irq_routing(PCI_INTC, PCI_IRQ_DISABLED); + pci_set_irq_routing(PCI_INTD, PCI_IRQ_DISABLED); } + static void -opti822_close(void *priv) +opti822_close(void *p) { - opti822_t *dev = (opti822_t *) priv; + opti822_t *dev = (opti822_t *)p; free(dev); } + static void * opti822_init(const device_t *info) { opti822_t *dev = (opti822_t *) malloc(sizeof(opti822_t)); memset(dev, 0, sizeof(opti822_t)); - pci_add_card(PCI_ADD_NORTHBRIDGE, opti822_read, opti822_write, dev); + pci_add_card(PCI_ADD_NORTHBRIDGE, opti822_pci_read, opti822_pci_write, dev); opti822_reset(dev); diff --git a/src/chipset/opti895.c b/src/chipset/opti895.c index b2e9ae0e0..95aaf4cb6 100644 --- a/src/chipset/opti895.c +++ b/src/chipset/opti895.c @@ -35,6 +35,7 @@ typedef struct { uint8_t idx, forced_green, + is_pci, regs[256], scratch[2]; @@ -78,7 +79,10 @@ opti895_recalc(opti895_t *dev) shflags = MEM_READ_INTERNAL | MEM_WRITE_DISABLED; } - mem_set_mem_state_both(0xf0000, 0x10000, shflags); + if (dev->is_pci) + mem_set_mem_state_cpu_both(0xf0000, 0x10000, shflags); + else + mem_set_mem_state_both(0xf0000, 0x10000, shflags); for (i = 0; i < 8; i++) { base = 0xd0000 + (i << 14); @@ -98,7 +102,10 @@ opti895_recalc(opti895_t *dev) } } - mem_set_mem_state_both(base, 0x4000, shflags); + if (dev->is_pci) + mem_set_mem_state_cpu_both(base, 0x4000, shflags); + else + mem_set_mem_state_both(base, 0x4000, shflags); } for (i = 0; i < 4; i++) { @@ -119,7 +126,10 @@ opti895_recalc(opti895_t *dev) } } - mem_set_mem_state_both(base, 0x4000, shflags); + if (dev->is_pci) + mem_set_mem_state_cpu_both(base, 0x4000, shflags); + else + mem_set_mem_state_both(base, 0x4000, shflags); } flushmmucache_nopc(); @@ -232,6 +242,8 @@ opti895_init(const device_t *info) io_sethandler(0x0022, 0x0003, opti895_read, NULL, NULL, opti895_write, NULL, NULL, dev); + dev->is_pci = info->local; + dev->scratch[0] = dev->scratch[1] = 0xff; dev->regs[0x01] = 0xc0; @@ -276,6 +288,20 @@ const device_t opti802g_device = { .config = NULL }; +const device_t opti802g_pci_device = { + .name = "OPTi 82C802G (PCI)", + .internal_name = "opti802g_pci", + .flags = 0, + .local = 1, + .init = opti895_init, + .close = opti895_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + const device_t opti895_device = { .name = "OPTi 82C895", .internal_name = "opti895", diff --git a/src/include/86box/chipset.h b/src/include/86box/chipset.h index 6cd49b2f1..25f6ac924 100644 --- a/src/include/86box/chipset.h +++ b/src/include/86box/chipset.h @@ -108,10 +108,12 @@ extern const device_t opti291_device; extern const device_t opti493_device; extern const device_t opti495_device; extern const device_t opti802g_device; +extern const device_t opti802g_pci_device; extern const device_t opti822_device; extern const device_t opti895_device; extern const device_t opti5x7_device; +extern const device_t opti5x7_pci_device; /* SiS */ extern const device_t rabbit_device; diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 1f616b791..638ac831b 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -637,7 +637,7 @@ machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU oth pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add(&opti802g_device); + device_add(&opti802g_pci_device); device_add(&opti822_device); device_add(&keyboard_ps2_device); device_add(&fdc37c665_device); diff --git a/src/machine/m_at_socket4.c b/src/machine/m_at_socket4.c index f47a6f6df..b67277ed7 100644 --- a/src/machine/m_at_socket4.c +++ b/src/machine/m_at_socket4.c @@ -390,7 +390,7 @@ machine_at_p5vl_init(const machine_t *model) pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add(&opti5x7_device); + device_add(&opti5x7_pci_device); device_add(&opti822_device); device_add(&sst_flash_29ee010_device); device_add(&keyboard_at_ami_device); diff --git a/src/machine/m_at_socket5.c b/src/machine/m_at_socket5.c index 4e51acb47..94d1b5ea6 100644 --- a/src/machine/m_at_socket5.c +++ b/src/machine/m_at_socket5.c @@ -340,7 +340,7 @@ machine_at_hot543_init(const machine_t *model) pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); - device_add(&opti5x7_device); + device_add(&opti5x7_pci_device); device_add(&opti822_device); device_add(&sst_flash_29ee010_device); device_add(&keyboard_at_device); From c80d2a0209b2488060a7306bba91711a5b0603da Mon Sep 17 00:00:00 2001 From: plant Date: Mon, 31 Oct 2022 00:12:39 -0600 Subject: [PATCH 54/60] Fix CPU-Z on IBM 486 It turns out that the IBM 486 does indeed have the AC bit in EFLAGS, based on CPU-Z detection behavior. --- src/cpu/x86_ops_flag.h | 4 ++-- src/mem/mem.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpu/x86_ops_flag.h b/src/cpu/x86_ops_flag.h index 3da048dd5..16215b525 100644 --- a/src/cpu/x86_ops_flag.h +++ b/src/cpu/x86_ops_flag.h @@ -293,11 +293,11 @@ static int opPOPFD(uint32_t fetchdat) else if (IOPLp) cpu_state.flags = (cpu_state.flags & 0x3000) | (templ & 0x4fd5) | 2; else cpu_state.flags = (cpu_state.flags & 0x3200) | (templ & 0x4dd5) | 2; - templ &= (is486) ? 0x3c0000 : 0; + templ &= (is486 || isibm486) ? 0x3c0000 : 0; templ |= ((cpu_state.eflags&3) << 16); if (cpu_CR4_mask & CR4_VME) cpu_state.eflags = (templ >> 16) & 0x3f; else if (CPUID) cpu_state.eflags = (templ >> 16) & 0x27; - else if (is486) cpu_state.eflags = (templ >> 16) & 7; + else if (is486 || isibm486) cpu_state.eflags = (templ >> 16) & 7; else cpu_state.eflags = (templ >> 16) & 3; flags_extract(); diff --git a/src/mem/mem.c b/src/mem/mem.c index ecda875a6..2aea1748f 100644 --- a/src/mem/mem.c +++ b/src/mem/mem.c @@ -302,7 +302,7 @@ mmutranslatereal_normal(uint32_t addr, int rw) if ((temp & 0x80) && (cr4 & CR4_PSE)) { /*4MB page*/ - if (((CPL == 3) && !(temp & 4) && !cpl_override) || (rw && !(temp & 2) && (((CPL == 3) && !cpl_override) || (is486 && (cr0 & WP_FLAG))))) { + if (((CPL == 3) && !(temp & 4) && !cpl_override) || (rw && !(temp & 2) && (((CPL == 3) && !cpl_override) || ((is486 || isibm486) && (cr0 & WP_FLAG))))) { cr2 = addr; temp &= 1; if (CPL == 3) @@ -323,7 +323,7 @@ mmutranslatereal_normal(uint32_t addr, int rw) temp = rammap((temp & ~0xfff) + ((addr >> 10) & 0xffc)); temp3 = temp & temp2; - if (!(temp & 1) || ((CPL == 3) && !(temp3 & 4) && !cpl_override) || (rw && !(temp3 & 2) && (((CPL == 3) && !cpl_override) || (is486 && (cr0 & WP_FLAG))))) { + if (!(temp & 1) || ((CPL == 3) && !(temp3 & 4) && !cpl_override) || (rw && !(temp3 & 2) && (((CPL == 3) && !cpl_override) || ((is486 || isibm486) && (cr0 & WP_FLAG))))) { cr2 = addr; temp &= 1; if (CPL == 3) From a5cfa8ec661e8f274a781cbf91805bcfd8b60be8 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 31 Oct 2022 13:30:19 +0600 Subject: [PATCH 55/60] qt: fix white screen for real --- src/qt/qt_mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index e43db23e7..e047b5d11 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -154,7 +154,7 @@ MainWindow::MainWindow(QWidget *parent) : ui->stackedWidget->setMouseTracking(true); statusBar()->setVisible(!hide_status_bar); statusBar()->setStyleSheet("QStatusBar::item {border: None; } QStatusBar QLabel { margin-right: 2px; margin-bottom: 1px; }"); - this->setStyleSheet("#centralWidget { background-color: black; }"); + this->centralWidget()->setStyleSheet("background-color: black;"); ui->toolBar->setVisible(!hide_tool_bar); renderers[0].reset(nullptr); auto toolbar_spacer = new QWidget(); From 65f6f453c0986a34523d39ccd880ebc8603480fe Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 1 Nov 2022 00:56:31 +0600 Subject: [PATCH 56/60] qt: try another way --- src/qt/qt_hardwarerenderer.cpp | 5 ++++- src/qt/qt_mainwindow.cpp | 13 ++++--------- src/qt/qt_openglrenderer.cpp | 4 ++++ src/qt/qt_rendererstack.cpp | 1 + 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/qt/qt_hardwarerenderer.cpp b/src/qt/qt_hardwarerenderer.cpp index 29b3613ea..006eb1d77 100644 --- a/src/qt/qt_hardwarerenderer.cpp +++ b/src/qt/qt_hardwarerenderer.cpp @@ -46,7 +46,9 @@ void HardwareRenderer::initializeGL() { m_context->makeCurrent(this); initializeOpenGLFunctions(); - m_texture = new QOpenGLTexture(QImage(2048,2048, QImage::Format::Format_RGB32)); + auto image = QImage(2048, 2048, QImage::Format_RGB32); + image.fill(0xff000000); + m_texture = new QOpenGLTexture(image); m_blt = new QOpenGLTextureBlitter; m_blt->setRedBlueSwizzle(true); m_blt->create(); @@ -138,6 +140,7 @@ void HardwareRenderer::initializeGL() pclog("OpenGL shader language version: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION)); glClearColor(0, 0, 0, 1); m_texture->setWrapMode(QOpenGLTexture::ClampToEdge); + update(); } void HardwareRenderer::paintGL() { diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index e047b5d11..b164864e8 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -507,15 +507,6 @@ MainWindow::MainWindow(QWidget *parent) : #endif if (!vnc_enabled) video_setblit(qt_blit); - if (start_in_fullscreen) { - connect(ui->stackedWidget, &RendererStack::blit, this, [this] () { - if (start_in_fullscreen) { - QTimer::singleShot(100, ui->actionFullscreen, &QAction::trigger); - start_in_fullscreen = 0; - } - }); - } - #ifdef MTR_ENABLED { ui->actionBegin_trace->setVisible(true); @@ -711,6 +702,10 @@ void MainWindow::showEvent(QShowEvent *event) { QApplication::processEvents(); this->adjustSize(); } + if (start_in_fullscreen) { + start_in_fullscreen = 0; + QTimer::singleShot(0, ui->actionFullscreen, &QAction::trigger); + } } void MainWindow::on_actionKeyboard_requires_capture_triggered() { diff --git a/src/qt/qt_openglrenderer.cpp b/src/qt/qt_openglrenderer.cpp index b3e771fea..c7cc3b4e2 100644 --- a/src/qt/qt_openglrenderer.cpp +++ b/src/qt/qt_openglrenderer.cpp @@ -14,6 +14,7 @@ * Copyright 2022 Teemu Korhonen */ +#include #include #include #include @@ -194,6 +195,9 @@ OpenGLRenderer::initialize() emit initialized(); + glClear(GL_COLOR_BUFFER_BIT); + + context->swapBuffers(this); } catch (const opengl_init_error &e) { /* Mark all buffers as in use */ for (auto &flag : buf_usage) diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index 670a0d0da..2d32f24a8 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -416,6 +416,7 @@ RendererStack::createRenderer(Renderer renderer) current->setFocusPolicy(Qt::NoFocus); current->setFocusProxy(this); current->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + current->setStyleSheet("background-color: black"); addWidget(current.get()); this->setStyleSheet("background-color: black"); From 9e729f3bd6f4352f559839b7ed5fe9d48ab8d7ed Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 1 Nov 2022 03:54:02 +0100 Subject: [PATCH 57/60] OPTi 822 shadow RAM. --- src/chipset/opti822.c | 51 ++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/src/chipset/opti822.c b/src/chipset/opti822.c index 20f0e8a67..210a7726e 100644 --- a/src/chipset/opti822.c +++ b/src/chipset/opti822.c @@ -40,24 +40,16 @@ #include <86box/chipset.h> #include <86box/spd.h> - -#define MEM_STATE_SHADOW_R 0x01 -#define MEM_STATE_SHADOW_W 0x02 -#define MEM_STATE_SMRAM 0x04 - - typedef struct { uint8_t irq_convert, pci_regs[256]; } opti822_t; - #define ENABLE_OPTI822_LOG 1 #ifdef ENABLE_OPTI822_LOG int opti822_do_log = ENABLE_OPTI822_LOG; - static void opti822_log(const char *fmt, ...) { @@ -73,6 +65,32 @@ opti822_log(const char *fmt, ...) #define opti822_log(fmt, ...) #endif +/* NOTE: We currently cheat and pass all PCI shadow RAM accesses to ISA as well. + This is because we currently do not have separate access mappings for + PCI and ISA at all. */ +static void +opti822_recalc(opti822_t *dev) +{ + int i, reg, bit_r, bit_w; + int state; + uint32_t base; + + for (i = 0; i < 12; i++) { + base = 0x000c0000 + (i << 14); + reg = 0x44 + ((i >> 2) ^ 3); + bit_w = (i & 3); + bit_r = bit_w + 4; + bit_w = 1 << bit_w; + bit_r = 1 << bit_r; + state = (dev->pci_regs[reg] & bit_w) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY; + state |= (dev->pci_regs[reg] & bit_r) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; + mem_set_mem_state_bus_both(base, 0x00004000, state); + } + + state = (dev->pci_regs[0x44] & 0x01) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY; + state |= (dev->pci_regs[0x44] & 0x02) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; + mem_set_mem_state_bus_both(0x000f0000, 0x00010000, state); +} /* NOTE: We cheat here. The real ALi M1435 uses a level to edge triggered IRQ converter when the most siginificant bit is set. We work around that by manipulating the @@ -104,7 +122,6 @@ opti822_update_irqs(opti822_t *dev, int set) } } - static void opti822_pci_write(int func, int addr, uint8_t val, void *priv) { @@ -151,15 +168,13 @@ opti822_pci_write(int func, int addr, uint8_t val, void *priv) dev->pci_regs[addr] = val; break; - /* TODO: We do not currently allow separate shadow RAM mapping for PCI. */ - case 0x45: - dev->pci_regs[addr] = val; + case 0x44: + dev->pci_regs[addr] = val & 0xcb; + opti822_recalc(dev); break; - case 0x46: - dev->pci_regs[addr] = val; - break; - case 0x47: + case 0x45 ... 0x47: dev->pci_regs[addr] = val; + opti822_recalc(dev); break; /* Memory hole stuff. */ @@ -300,7 +315,6 @@ opti822_pci_write(int func, int addr, uint8_t val, void *priv) } } - static uint8_t opti822_pci_read(int func, int addr, void *priv) { @@ -317,7 +331,6 @@ opti822_pci_read(int func, int addr, void *priv) return ret; } - static void opti822_reset(void *priv) { @@ -349,7 +362,6 @@ opti822_reset(void *priv) pci_set_irq_routing(PCI_INTD, PCI_IRQ_DISABLED); } - static void opti822_close(void *p) { @@ -358,7 +370,6 @@ opti822_close(void *p) free(dev); } - static void * opti822_init(const device_t *info) { From 1bb1bb9f46129cf35fc977fa83d14d7e7a91835e Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 1 Nov 2022 03:59:08 +0100 Subject: [PATCH 58/60] Fixed the MSI MS-6168 / Bora Pro AGP Voodoo. --- src/video/vid_voodoo_banshee.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/video/vid_voodoo_banshee.c b/src/video/vid_voodoo_banshee.c index d1521ce05..faf35c945 100644 --- a/src/video/vid_voodoo_banshee.c +++ b/src/video/vid_voodoo_banshee.c @@ -2857,7 +2857,8 @@ banshee_init_common(const device_t *info, char *fn, int has_sgram, int type, int } if (!banshee->has_bios) - mem_size = info->local; /* fixed size for on-board chips */ + // mem_size = info->local; /* fixed size for on-board chips */ + mem_size = device_get_config_int("memory"); /* MS-6168 / Bora Pro can do both 8 and 16 MB. */ else if (has_sgram) { if (banshee->type == TYPE_VELOCITY100) mem_size = 8; /* Velocity 100 only supports 8 MB */ @@ -3001,7 +3002,7 @@ v3_2000_agp_init(const device_t *info) static void * v3_2000_agp_onboard_init(const device_t *info) { - return banshee_init_common(info, NULL, 0, TYPE_V3_2000, VOODOO_3, 1); + return banshee_init_common(info, NULL, 1, TYPE_V3_2000, VOODOO_3, 1); } static void * v3_3000_init(const device_t *info) @@ -3144,7 +3145,7 @@ const device_t voodoo_3_2000_agp_onboard_8m_device = { { .available = NULL }, .speed_changed = banshee_speed_changed, .force_redraw = banshee_force_redraw, - banshee_sdram_config + banshee_sgram_config }; const device_t voodoo_3_3000_device = { From e44e74dd7c4ef57bee016fc9aa379a2f4518650d Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 1 Nov 2022 11:34:42 +0600 Subject: [PATCH 59/60] qt: fix macOS build --- src/qt/qt_openglrenderer.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/qt/qt_openglrenderer.cpp b/src/qt/qt_openglrenderer.cpp index c7cc3b4e2..6d5b36d80 100644 --- a/src/qt/qt_openglrenderer.cpp +++ b/src/qt/qt_openglrenderer.cpp @@ -14,7 +14,6 @@ * Copyright 2022 Teemu Korhonen */ -#include #include #include #include From a9c472d6b6837796026bd909493244ecc53b8fbe Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 1 Nov 2022 16:19:46 +0100 Subject: [PATCH 60/60] Apply "Keyboard requires capture" also in full screen mode, fixes #2781. --- src/qt/qt_mainwindow.cpp | 2 +- src/qt/qt_winrawinputfilter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index b164864e8..936dc9212 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1626,7 +1626,7 @@ void MainWindow::showMessage_(int flags, const QString &header, const QString &m void MainWindow::keyPressEvent(QKeyEvent* event) { - if (send_keyboard_input && !(kbd_req_capture && !mouse_capture && !video_fullscreen)) + if (send_keyboard_input && !(kbd_req_capture && !mouse_capture)) { // Windows keys in Qt have one-to-one mapping. if (event->key() == Qt::Key_Pause && !keyboard_recv(0x38) && !keyboard_recv(0x138)) { diff --git a/src/qt/qt_winrawinputfilter.cpp b/src/qt/qt_winrawinputfilter.cpp index 1e5ec5a71..e798093c0 100644 --- a/src/qt/qt_winrawinputfilter.cpp +++ b/src/qt/qt_winrawinputfilter.cpp @@ -174,7 +174,7 @@ void WindowsRawInputFilter::keyboard_handle(PRAWINPUT raw) RAWKEYBOARD rawKB = raw->data.keyboard; scancode = rawKB.MakeCode; - if (kbd_req_capture && !mouse_capture && !video_fullscreen) + if (kbd_req_capture && !mouse_capture) return; /* If it's not a scan code that starts with 0xE1 */