Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7f69f00
Query UI font from system on Windows
aubymori Feb 3, 2026
4ff39f3
Merge pull request #6777 from aubymori/master
OBattler Feb 3, 2026
657155a
Work around Windows' inappropriate, ugly default fonts when using an …
OBattler Feb 3, 2026
419a3ac
MDS v2/MDX: Actually use nvr_path() when removing the temporary file,…
OBattler Feb 3, 2026
a0e6566
Add the ADD-X Normerel Xenon - original patch by Kotochi, plus my fixes.
OBattler Feb 4, 2026
2d01fb4
Translated using Weblate (Greek)
DimMan88 Feb 4, 2026
98d00ab
Merge pull request #6778 from 86Box-chan/weblate-86box-86box
OBattler Feb 4, 2026
460c8c7
Headland: Make ROMCS Disable bit only affect E0000-EFFFF per the HT18…
win2kgamer Feb 5, 2026
051efe2
Merge pull request #6779 from win2kgamer/ht18-romcs
OBattler Feb 5, 2026
ad2f5c3
Translated using Weblate (Spanish)
StrangerCoug Feb 5, 2026
e953c9e
Merge pull request #6781 from 86Box-chan/weblate-86box-86box
OBattler Feb 6, 2026
50b961e
ESC/P 2: Add "Auto LF" DIP switch
Lili1228 Feb 6, 2026
c3094d0
ESC/P 2: Exact paper sizes, 1/36" margins
Lili1228 Feb 6, 2026
d3d86d4
Merge pull request #6782 from Lili1228/master
OBattler Feb 6, 2026
eaa4c70
SLiRP: Support for changing the network.
chungy Feb 7, 2026
85e4122
Try to fix the build on Windows.
chungy Feb 7, 2026
441f396
Use `inet_pton` instead of `inet_aton`
chungy Feb 7, 2026
7ec2e3f
Merge pull request #6783 from chungy/slirp_custom_addr
OBattler Feb 7, 2026
6fa6e5c
Fix video initialization on four 486 machines and the IDE SET DRIVE P…
OBattler Feb 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cdrom/cdrom_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -2965,7 +2965,7 @@ image_close(void *local)
free(img);

if (temp_file[0] != 0x00) {
remove(temp_file);
remove(nvr_path(temp_file));
temp_file[0] = 0x00;
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/chipset/headland.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,10 @@ memmap_state_default(headland_t *dev, uint8_t ht_romcs)
mem_mapping_disable(&dev->mid_mapping);

if (ht_romcs)
mem_set_mem_state(0x0e0000, 0x20000, MEM_READ_ROMCS | MEM_WRITE_ROMCS);
mem_set_mem_state(0x0e0000, 0x10000, MEM_READ_ROMCS | MEM_WRITE_ROMCS);
else
mem_set_mem_state(0x0e0000, 0x20000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
mem_set_mem_state(0x0e0000, 0x10000, MEM_READ_EXTERNAL | MEM_WRITE_EXTERNAL);
mem_set_mem_state(0x0f0000, 0x10000, MEM_READ_ROMCS | MEM_WRITE_ROMCS);
mem_set_mem_state(0xfe0000, 0x20000, MEM_READ_ROMCS | MEM_WRITE_ROMCS);

mem_mapping_disable(&dev->shadow_mapping[0]);
Expand Down
4 changes: 4 additions & 0 deletions src/chipset/opti499.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <86box/device.h>
#include <86box/mem.h>
#include <86box/port_92.h>
#include <86box/plat_fallthrough.h>
#include <86box/plat_unused.h>
#include <86box/chipset.h>

Expand Down Expand Up @@ -176,6 +177,9 @@ opti499_write(uint16_t addr, uint8_t val, void *priv)
break;

case 0x22:
mem_a20_chipset = (val & 0x02);
mem_a20_recalc();
fallthrough;
case 0x23:
case 0x26:
case 0x2d:
Expand Down
36 changes: 34 additions & 2 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
* -DANSI_CFG for use on these systems.
*/

#ifdef _WIN32
# include <ws2tcpip.h>
#else
# include <arpa/inet.h>
#endif
#include <inttypes.h>
#ifdef ENABLE_CONFIG_LOG
#include <stdarg.h>
Expand Down Expand Up @@ -886,6 +891,25 @@ load_network(void)
} else
strcpy(nc->host_dev_name, "none");

if (nc->net_type == NET_TYPE_SLIRP) {
sprintf(temp, "net_%02i_addr", c + 1);
p = ini_section_get_string(cat, temp, "");
if (p && *p) {
struct in_addr addr;
if (inet_pton(AF_INET, p, &addr)) {
uint8_t *bytes = (uint8_t *)&addr.s_addr;
bytes[3] = 0;
sprintf(nc->slirp_net, "%d.%d.%d.0", bytes[0], bytes[1], bytes[2]);
} else {
nc->slirp_net[0] = '\0';
}
} else {
nc->slirp_net[0] = '\0';
}
} else {
nc->slirp_net[0] = '\0';
}

sprintf(temp, "net_%02i_switch_group", c + 1);
nc->switch_group = ini_section_get_int(cat, temp, NET_SWITCH_GRP_MIN);
if (nc->switch_group < NET_SWITCH_GRP_MIN)
Expand Down Expand Up @@ -1458,7 +1482,7 @@ load_floppy_and_cdrom_drives(void)
int c;
int d;
int count = cdrom_get_type_count();

#ifndef DISABLE_FDD_AUDIO
fdd_audio_load_profiles();
#endif
Expand Down Expand Up @@ -1532,7 +1556,7 @@ load_floppy_and_cdrom_drives(void)
fdd_set_audio_profile(c, d);
#else
fdd_set_audio_profile(c, 0);
#endif
#endif

for (int i = 0; i < MAX_PREV_IMAGES; i++) {
fdd_image_history[c][i] = (char *) calloc((MAX_IMAGE_PATH_LEN + 1) << 1, sizeof(char));
Expand Down Expand Up @@ -2987,6 +3011,14 @@ save_network(void)
else
ini_section_set_int(cat, temp, nc->link_state);

if (nc->net_type == NET_TYPE_SLIRP && nc->slirp_net[0] != '\0') {
sprintf(temp, "net_%02i_addr", c + 1);
ini_section_set_string(cat, temp, nc->slirp_net);
} else {
sprintf(temp, "net_%02i_addr", c + 1);
ini_section_delete_var(cat, temp);
}

sprintf(temp, "net_%02i_switch_group", c + 1);
if (nc->switch_group == NET_SWITCH_GRP_MIN)
ini_section_delete_var(cat, temp);
Expand Down
4 changes: 2 additions & 2 deletions src/disk/hdc_ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -2610,8 +2610,8 @@ ide_callback(void *priv)
err = ABRT_ERR;
else {
/* Only accept after RESET or DIAG. */
if (ide->params_specified) {
ide->cfg_spt = ide->tf->secount;
if (!ide->params_specified) {
ide->cfg_spt = (ide->tf->secount == 0) ? 256 : ide->tf->secount;
ide->cfg_hpc = ide->tf->head + 1;

ide->params_specified = 1;
Expand Down
3 changes: 3 additions & 0 deletions src/include/86box/machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,9 @@ extern int machine_at_4gpv5_init(const machine_t *);
/* Contaq 82C597 */
extern int machine_at_greenb_init(const machine_t *);

/* OPTi 499 */
extern int machine_at_xenon_init(const machine_t *);

/* OPTi 895 */
#ifdef EMU_DEVICE_H
extern const device_t j403tg_device;
Expand Down
1 change: 1 addition & 0 deletions src/include/86box/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ extern int read_type;

extern int mem_a20_state;
extern int mem_a20_alt;
extern int mem_a20_chipset;
extern int mem_a20_key;

extern uint8_t read_mem_b(uint32_t addr);
Expand Down
1 change: 1 addition & 0 deletions src/include/86box/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ typedef struct netcard_conf_t {
uint32_t link_state;
uint8_t switch_group;
uint8_t promisc_mode;
char slirp_net[16];
char nrs_hostname[128];
} netcard_conf_t;

Expand Down
24 changes: 12 additions & 12 deletions src/include/86box/prt_papersizes.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@
#define LEDGER_PAGE_HEIGHT 17.0

/* Standard A0 */
#define A0_PAGE_WIDTH 33.125
#define A0_PAGE_HEIGHT 46.75
#define A0_PAGE_WIDTH 33.110236
#define A0_PAGE_HEIGHT 46.811023

/* Standard A1 */
#define A1_PAGE_WIDTH 23.375
#define A1_PAGE_HEIGHT 33.125
#define A1_PAGE_WIDTH 23.385826
#define A1_PAGE_HEIGHT 33.110236

/* Standard A2 */
#define A2_PAGE_WIDTH 16.5
#define A2_PAGE_HEIGHT 23.375
#define A2_PAGE_WIDTH 16.535433
#define A2_PAGE_HEIGHT 23.385826

/* Standard A3 */
#define A3_PAGE_WIDTH 11.75
#define A3_PAGE_HEIGHT 16.5
#define A3_PAGE_WIDTH 11.692913
#define A3_PAGE_HEIGHT 16.535433

/* Standard A4 */
#define A4_PAGE_WIDTH 8.25
#define A4_PAGE_HEIGHT 11.75
#define A4_PAGE_WIDTH 8.267716
#define A4_PAGE_HEIGHT 11.692913

/* Standard B4 */
#define B4_PAGE_WIDTH 9.875
#define B4_PAGE_HEIGHT 13.875
#define B4_PAGE_WIDTH 9.8425197
#define B4_PAGE_HEIGHT 13.897637

#endif /*EMU_PLAT_FALLTHROUGH_H*/
2 changes: 2 additions & 0 deletions src/machine/m_at_socket1.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,8 @@ machine_at_tuliptc38_init(const machine_t *model)
device_add(&ide_isa_device);
device_add_params(&fdc37c6xx_device, (void *) (FDC37C651 | FDC37C6XX_IDE_PRI));

video_reset(gfxcard[0]);

if (gfxcard[0] == VID_INTERNAL) {
bios_load_aux_linear("roms/machines/tuliptc38/VBIOS.BIN",
0x000c0000, 32768, 0);
Expand Down
4 changes: 4 additions & 0 deletions src/machine/m_at_socket2.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ machine_at_dell466np_init(const machine_t *model)
machine_at_common_init(model);
device_add(&sis_85c461_device);

video_reset(gfxcard[0]);

if (gfxcard[0] == VID_INTERNAL)
device_add(machine_get_vid_device(machine));
else {
Expand Down Expand Up @@ -354,6 +356,8 @@ machine_at_valuepoint433_init(const machine_t *model) // hangs without the PS/2
if (fdc_current[0] == FDC_INTERNAL)
device_add(&fdc_at_device);

video_reset(gfxcard[0]);

if (gfxcard[0] != VID_INTERNAL) {
for (uint16_t i = 0; i < 32768; i++)
rom[i] = mem_readb_phys(0x000c0000 + i);
Expand Down
25 changes: 25 additions & 0 deletions src/machine/m_at_socket3.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,29 @@ machine_at_greenb_init(const machine_t *model)
return ret;
}

/* OPTi 499 */
int
machine_at_xenon_init(const machine_t *model)
{
int ret;

ret = bios_load_linear("roms/machines/xenon/addx-bios-7-71-i28f001.bin",
0x000e0000, 131072, 0);

if (bios_only || !ret)
return ret;

machine_at_common_init(model);

device_add(&opti499_device);
device_add(&ide_vlb_device);
device_add_params(&fdc37c6xx_device, (void *) (FDC37C661 | FDC37C6XX_IDE_PRI));
device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);
device_add(&intel_flash_bxt_device);

return ret;
}

/* OPTi 895 */
static const device_config_t j403tg_config[] = {
// clang-format off
Expand Down Expand Up @@ -467,6 +490,8 @@ machine_at_tg486g_init(const machine_t *model)

device_add_params(machine_get_kbc_device(machine), (void *) model->kbc_params);

video_reset(gfxcard[0]);

if (gfxcard[0] != VID_INTERNAL) {
for (uint16_t i = 0; i < 32768; i++)
rom[i] = mem_readb_phys(0x000c0000 + i);
Expand Down
53 changes: 48 additions & 5 deletions src/machine/machine_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -8761,6 +8761,50 @@ const machine_t machines[] = {
.snd_device = NULL,
.net_device = NULL
},
/* Has AMIKey F KBC firmware. */
{
.name = "[OPTi 499] ADD-X Normerel Xenon",
.internal_name = "xenon",
.type = MACHINE_TYPE_486_S3,
.chipset = MACHINE_CHIPSET_OPTI_499,
.init = machine_at_xenon_init,
.p1_handler = machine_generic_p1_handler,
.gpio_handler = NULL,
.available_flag = MACHINE_AVAILABLE,
.gpio_acpi_handler = NULL,
.cpu = {
.package = CPU_PKG_SOCKET3,
.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_PS2_VLB,
.flags = MACHINE_IDE | MACHINE_APM,
.ram = {
.min = 1024,
.max = 65536,
.step = 1024
},
.nvrmask = 127,
.jumpered_ecp_dma = 0,
.default_jumpered_ecp_dma = -1,
.kbc_device = &kbc_at_device,
.kbc_params = KBC_VEN_AMI | 0x00004600,
.kbc_p1 = 0x00000cf0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,
.kbd_device = NULL,
.fdc_device = NULL,
.sio_device = NULL,
.vid_device = NULL,
.snd_device = NULL,
.net_device = NULL
},
/* Version 1.0 has an AMIKEY-2, version 2.0 has a VIA VT82C42N KBC. */
{
.name = "[OPTi 895] Jetway J-403TG",
Expand Down Expand Up @@ -18511,11 +18555,10 @@ const machine_t machines[] = {
.block = CPU_BLOCK(CPU_CYRIX3S),
.min_bus = 66666667,
.max_bus = 83333333,
/* TODO: to find the actual voltage and multiplier bus speeds. */
.min_voltage = 1800,
.max_voltage = 3500,
.min_multi = 1.5,
.max_multi = 8.0
.min_voltage = 2050,
.max_voltage = 3100,
.min_multi = 3.5,
.max_multi = 5.0
},
.bus_flags = MACHINE_PS2_PCI | MACHINE_BUS_USB,
.flags = MACHINE_IDE_DUAL | MACHINE_SOUND | MACHINE_APM | MACHINE_ACPI | MACHINE_USB,
Expand Down
11 changes: 6 additions & 5 deletions src/mem/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ int cachesize = 256;
uint32_t get_phys_virt;
uint32_t get_phys_phys;

int mem_a20_key = 0;
int mem_a20_alt = 0;
int mem_a20_state = 0;
int mem_a20_key = 0;
int mem_a20_alt = 0;
int mem_a20_chipset = 0;
int mem_a20_state = 0;

int mmuflush = 0;

Expand Down Expand Up @@ -3109,12 +3110,12 @@ mem_a20_recalc(void)
if (!is286) {
rammask = 0xfffff;
flushmmucache();
mem_a20_key = mem_a20_alt = mem_a20_state = 0;
mem_a20_key = mem_a20_alt = mem_a20_state = mem_a20_chipset = 0;

return;
}

state = mem_a20_key | mem_a20_alt;
state = mem_a20_key | mem_a20_alt | mem_a20_chipset;
if (state && !mem_a20_state) {
rammask = cpu_16bitbus ? 0xffffff : 0xffffffff;
if (is6117)
Expand Down
32 changes: 25 additions & 7 deletions src/network/net_slirp.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include <ws2tcpip.h>
#else
# include <poll.h>
#endif
Expand Down Expand Up @@ -493,13 +494,30 @@ net_slirp_init(const netcard_t *card, const uint8_t *mac_addr, UNUSED(void *priv
slirp->pfd = calloc(1, slirp->pfd_size);
#endif

/* Set the IP addresses to use. */
struct in_addr net = { .s_addr = htonl(0x0a000000 | (slirp_card_num << 8)) }; /* 10.0.x.0 */
struct in_addr mask = { .s_addr = htonl(0xffffff00) }; /* 255.255.255.0 */
struct in_addr host = { .s_addr = htonl(0x0a000002 | (slirp_card_num << 8)) }; /* 10.0.x.2 */
struct in_addr dhcp = { .s_addr = htonl(0x0a00000f | (slirp_card_num << 8)) }; /* 10.0.x.15 */
struct in_addr dns = { .s_addr = htonl(0x0a000003 | (slirp_card_num << 8)) }; /* 10.0.x.3 */
struct in_addr bind = { .s_addr = htonl(0x00000000) }; /* 0.0.0.0 */
struct in_addr net;
struct in_addr host;
struct in_addr dhcp;
struct in_addr dns;

/* Set the IP addresses to use.
Use a configured address if set, otherwise 10.0.x.0 */
const char *slirp_net = net_cards_conf[card->card_num].slirp_net;
if (slirp_net[0] != '\0') {
struct in_addr addr;
inet_pton(AF_INET, slirp_net, &addr);
net.s_addr = htonl(ntohl(addr.s_addr) & 0xffffff00);
host.s_addr = htonl(ntohl(addr.s_addr) + 2);
dhcp.s_addr = htonl(ntohl(addr.s_addr) + 15);
dns.s_addr = htonl(ntohl(addr.s_addr) + 3);
} else {
net.s_addr = htonl(0x0a000000 | (slirp_card_num << 8)); /* 10.0.x.0 */
host.s_addr = htonl(0x0a000002 | (slirp_card_num << 8)); /* 10.0.x.2 */
dhcp.s_addr = htonl(0x0a00000f | (slirp_card_num << 8)); /* 10.0.x.15 */
dns.s_addr = htonl(0x0a000003 | (slirp_card_num << 8)); /* 10.0.x.3 */
}

struct in_addr mask = { .s_addr = htonl(0xffffff00) }; /* 255.255.255.0 */
struct in_addr bind = { .s_addr = htonl(0x00000000) }; /* 0.0.0.0 */

const SlirpConfig slirp_config = {
#if SLIRP_CHECK_VERSION(4, 9, 0)
Expand Down
Loading
Loading