Some fixes related to the recently Intel Monsoon machine.

This commit is contained in:
OBattler
2026-01-19 20:45:47 +01:00
parent cf369525de
commit f925685ba8
3 changed files with 16 additions and 14 deletions

View File

@@ -28,8 +28,6 @@
#include <86box/port_92.h>
#include <86box/chipset.h>
#define machine_at_prolineamt_init NULL /* checks for a removed machine */
typedef struct vl82c480_t {
uint8_t idx;
uint8_t regs[256];
@@ -133,7 +131,7 @@ vl82c480_write(uint16_t addr, uint8_t val, void *priv)
case 0x02: case 0x03:
dev->regs[dev->idx] = val;
if ((machines[machine].init == machine_at_martin_init) ||
(machines[machine].init == machine_at_prolineamt_init))
(machines[machine].init == machine_at_monsoon_init))
vl82c480_recalc_banks(dev);
break;
case 0x04:
@@ -220,9 +218,10 @@ vl82c480_init(const device_t *info)
vl82c480_t *dev = (vl82c480_t *) calloc(1, sizeof(vl82c480_t));
uint32_t sizes[8] = { 0, 0, 1024, 2048, 4096, 8192, 16384, 32768 };
uint32_t ms = mem_size;
uint8_t min_i = (machines[machine].init == machine_at_prolineamt_init) ? 1 : 0;
uint8_t min_j = (machines[machine].init == machine_at_prolineamt_init) ? 4 : 2;
uint8_t max_j = (machines[machine].init == machine_at_prolineamt_init) ? 8 : 7;
uint8_t min_i = (machines[machine].init == machine_at_monsoon_init) ? 1 : 0;
uint8_t max_i = (machines[machine].init == machine_at_monsoon_init) ? 2 : 4;
uint8_t min_j = (machines[machine].init == machine_at_monsoon_init) ? 2 : 2;
uint8_t max_j = (machines[machine].init == machine_at_monsoon_init) ? 7 : 7;
dev->regs[0x00] = info->local;
dev->regs[0x01] = 0xff;
@@ -233,15 +232,15 @@ vl82c480_init(const device_t *info)
dev->regs[0x07] = 0x21;
dev->regs[0x08] = 0x38;
if (machines[machine].init == machine_at_prolineamt_init) {
dev->banks[0] = 4096;
/* Bank 0 is ignored if 64 MB is installed. */
if (ms != 65536)
ms -= 4096;
if (machines[machine].init == machine_at_monsoon_init) {
if (ms >= 16384) {
dev->banks[0] = 0;
min_i = 0;
} else
dev->banks[0] = 4096;
}
if (ms > 0) for (uint8_t i = min_i; i < 4; i++) {
if (ms > 0) for (uint8_t i = min_i; i < max_i; i++) {
for (uint8_t j = min_j; j < max_j; j++) {
if (ms >= sizes[j])
dev->banks[i] = sizes[j];

View File

@@ -8482,7 +8482,7 @@ const machine_t machines[] = {
.default_jumpered_ecp_dma = -1,
.kbc_device = NULL,
.kbc_params = 0x00000000,
.kbc_p1 = 0x000004f0,
.kbc_p1 = 0x00000ce0,
.gpio = 0xffffffff,
.gpio_acpi = 0xffffffff,
.device = NULL,

View File

@@ -1191,6 +1191,9 @@ nvr_at_init(const device_t *info)
if (info->local & 0x20)
local->def = 0x00;
if (machines[machine].init == machine_at_monsoon_init)
local->def = 0xff;
if (info->local & 0x40)
local->flags |= FLAG_MULTI_BANK;