Merge remote-tracking branch 'origin/master' into version/4.1

This commit is contained in:
OBattler
2023-10-11 18:18:24 +02:00
4 changed files with 112 additions and 60 deletions

View File

@@ -1,32 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Windows 10]
- 86Box version: [e.g. v3.7.1 build 4032; saying "Latest from Jenkins" isn't helpful]
- Build information: [i.e. new/old dynarec, architecture and build type]
**Additional context**
Add any other context about the problem here. If you are using an Optimized build, make sure to try the regular build too before filing a bug report!

66
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,66 @@
name: Bug Report
description: File a bug report
title: "Title"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
- type: textarea
attributes:
label: Configuration file
description: Please copy and paste your machine configuration file (`86box.cfg`). This will be automatically formatted into code, so no need for backticks.
render: ini
- type: input
attributes:
label: Operating system
description: What is your host operating system?
placeholder: e.g. Windows 10
- type: input
attributes:
label: CPU
description: What is your host CPU?
placeholder: e.g. AMD Ryzen 5 5600G
- type: input
attributes:
label: 86Box version
description: What version of 86Box are you running? (Saying "Latest from Jenkins" is not helpful.)
placeholder: e.g. v4.0 build 5000
- type: dropdown
attributes:
label: Build architecture
description: 86Box for what architecture are you using?
options:
- Linux - ARM (32-bit)
- Linux - ARM (64-bit)
- Linux - x64 (64-bit)
- Linux - x86 (32-bit)
- macOS - Universal (Intel and Apple Silicon)
- Windows - x64 (64-bit)
- Windows - x86 (32-bit)
- type: checkboxes
attributes:
label: Build type
description: What type of build are you using?
options:
- label: New recompiler
- label: Debug build
- type: dropdown
attributes:
label: Download source
description: Where did you download 86Box from?
options:
- Official website (Jenkins, GitHub)
- Manager auto-update
- I built 86Box myself (please tell us more about your build configuration)
- I got 86Box from a third party repository (please tell us where)
- type: textarea
attributes:
label: Additional context
description: Is there anything else you want to tell us?

View File

@@ -1388,31 +1388,36 @@ t128_read(uint32_t addr, void *priv)
uint8_t ret = 0xff;
addr &= 0x3fff;
if (addr >= 0 && addr < 0x1800)
if (ncr_dev->t128.bios_enabled && (addr >= 0) && (addr < 0x1800))
ret = ncr_dev->bios_rom.rom[addr & 0x1fff];
else if (addr >= 0x1800 && addr < 0x1880)
else if ((addr >= 0x1800) && (addr < 0x1880))
ret = ncr_dev->t128.ext_ram[addr & 0x7f];
else if (addr >= 0x1c00 && addr < 0x1c20) {
else if ((addr >= 0x1c00) && (addr < 0x1c20))
ret = ncr_dev->t128.ctrl;
} else if (addr >= 0x1c20 && addr < 0x1c40) {
else if ((addr >= 0x1c20) && (addr < 0x1c40)) {
ret = ncr_dev->t128.status;
ncr_log("T128 status read = %02x, cur bus = %02x, req = %02x, dma = %02x\n", ret, ncr->cur_bus, ncr->cur_bus & BUS_REQ, ncr->mode & MODE_DMA);
} else if (addr >= 0x1d00 && addr < 0x1e00) {
ncr_log("T128 status read = %02x, cur bus = %02x, req = %02x, dma = %02x\n",
ret, ncr->cur_bus, ncr->cur_bus & BUS_REQ, ncr->mode & MODE_DMA);
} else if ((addr >= 0x1d00) && (addr < 0x1e00))
ret = ncr_read((addr - 0x1d00) >> 5, ncr_dev);
} else if (addr >= 0x1e00 && addr < 0x2000) {
if (ncr_dev->t128.host_pos >= MIN(512, dev->buffer_length) || ncr->dma_mode != DMA_INITIATOR_RECEIVE) {
else if (addr >= 0x1e00 && addr < 0x2000) {
if ((ncr_dev->t128.host_pos >= MIN(512, dev->buffer_length)) ||
(ncr->dma_mode != DMA_INITIATOR_RECEIVE))
ret = 0xff;
} else {
else {
ret = ncr_dev->t128.buffer[ncr_dev->t128.host_pos++];
ncr_log("Read transfer, addr = %i, pos = %i\n", addr & 0x1ff, ncr_dev->t128.host_pos);
ncr_log("Read transfer, addr = %i, pos = %i\n", addr & 0x1ff,
ncr_dev->t128.host_pos);
if (ncr_dev->t128.host_pos == MIN(512, dev->buffer_length)) {
ncr_dev->t128.status &= ~0x04;
ncr_log("Transfer busy read, status = %02x, period = %lf\n", ncr_dev->t128.status, ncr_dev->period);
ncr_log("Transfer busy read, status = %02x, period = %lf\n",
ncr_dev->t128.status, ncr_dev->period);
if (ncr_dev->period == 0.2 || ncr_dev->period == 0.02)
timer_on_auto(&ncr_dev->timer, 40.2);
} else if (ncr_dev->t128.host_pos < MIN(512, dev->buffer_length) && scsi_device_get_callback(dev) > 100.0)
} else if ((ncr_dev->t128.host_pos < MIN(512, dev->buffer_length)) &&
(scsi_device_get_callback(dev) > 100.0))
cycles += 100; /*Needed to avoid timer de-syncing with transfers.*/
}
}
@@ -1428,23 +1433,25 @@ t128_write(uint32_t addr, uint8_t val, void *priv)
const scsi_device_t *dev = &scsi_devices[ncr_dev->bus][ncr->target_id];
addr &= 0x3fff;
if (addr >= 0x1800 && addr < 0x1880)
if ((addr >= 0x1800) && (addr < 0x1880))
ncr_dev->t128.ext_ram[addr & 0x7f] = val;
else if (addr >= 0x1c00 && addr < 0x1c20) {
else if ((addr >= 0x1c00) && (addr < 0x1c20)) {
if ((val & 0x02) && !(ncr_dev->t128.ctrl & 0x02)) {
ncr_dev->t128.status |= 0x02;
ncr_log("Timer fired\n");
}
ncr_dev->t128.ctrl = val;
ncr_log("T128 ctrl write = %02x\n", val);
} else if (addr >= 0x1d00 && addr < 0x1e00)
} else if ((addr >= 0x1d00) && (addr < 0x1e00))
ncr_write((addr - 0x1d00) >> 5, val, ncr_dev);
else if (addr >= 0x1e00 && addr < 0x2000) {
if (ncr_dev->t128.host_pos < MIN(512, dev->buffer_length) && ncr->dma_mode == DMA_SEND) {
else if ((addr >= 0x1e00) && (addr < 0x2000)) {
if ((ncr_dev->t128.host_pos < MIN(512, dev->buffer_length)) &&
(ncr->dma_mode == DMA_SEND)) {
ncr_dev->t128.buffer[ncr_dev->t128.host_pos] = val;
ncr_dev->t128.host_pos++;
ncr_log("Write transfer, addr = %i, pos = %i, val = %02x\n", addr & 0x1ff, ncr_dev->t128.host_pos, val);
ncr_log("Write transfer, addr = %i, pos = %i, val = %02x\n",
addr & 0x1ff, ncr_dev->t128.host_pos, val);
if (ncr_dev->t128.host_pos == MIN(512, dev->buffer_length)) {
ncr_dev->t128.status &= ~0x04;
@@ -1605,8 +1612,9 @@ ncr_init(const device_t *info)
ncr_dev->irq = device_get_config_int("irq");
ncr_dev->t128.bios_enabled = device_get_config_int("boot");
rom_init(&ncr_dev->bios_rom, T128_ROM,
ncr_dev->rom_addr, 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL);
if (ncr_dev->t128.bios_enabled)
rom_init(&ncr_dev->bios_rom, T128_ROM,
ncr_dev->rom_addr, 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL);
mem_mapping_add(&ncr_dev->mapping, ncr_dev->rom_addr, 0x4000,
t128_read, NULL, NULL,
@@ -1644,6 +1652,9 @@ ncr_init(const device_t *info)
} else {
ncr_dev->t128.status = 0x04;
ncr_dev->t128.host_pos = 512;
if (!ncr_dev->t128.bios_enabled)
ncr_dev->t128.status |= 0x80;
}
timer_add(&ncr_dev->timer, ncr_callback, ncr_dev, 0);
@@ -1894,6 +1905,13 @@ static const device_config_t t128_config[] = {
{ .description = "" }
},
},
{
.name = "boot",
.description = "Enable Boot ROM",
.type = CONFIG_BINARY,
.default_string = "",
.default_int = 1
},
{ .name = "", .description = "", .type = CONFIG_END }
};
// clang-format on

View File

@@ -73,16 +73,16 @@ ati68860_ramdac_out(uint16_t addr, uint8_t val, void *priv, svga_t *svga)
switch (addr) {
case 0:
svga_out(dev->on ? 0x2ec : 0x3c8, val, svga);
svga_out((dev && dev->on) ? 0x2ec : 0x3c8, val, svga);
break;
case 1:
svga_out(dev->on ? 0x2ed : 0x3c9, val, svga);
svga_out((dev && dev->on) ? 0x2ed : 0x3c9, val, svga);
break;
case 2:
svga_out(dev->on ? 0x2ea : 0x3c6, val, svga);
svga_out((dev && dev->on) ? 0x2ea : 0x3c6, val, svga);
break;
case 3:
svga_out(dev->on ? 0x2eb : 0x3c7, val, svga);
svga_out((dev && dev->on) ? 0x2eb : 0x3c7, val, svga);
break;
default:
ramdac->regs[addr & 0xf] = val;
@@ -178,16 +178,16 @@ ati68860_ramdac_in(uint16_t addr, void *priv, svga_t *svga)
switch (addr) {
case 0:
temp = svga_in(dev->on ? 0x2ec : 0x3c8, svga);
temp = svga_in((dev && dev->on) ? 0x2ec : 0x3c8, svga);
break;
case 1:
temp = svga_in(dev->on ? 0x2ed : 0x3c9, svga);
temp = svga_in((dev && dev->on) ? 0x2ed : 0x3c9, svga);
break;
case 2:
temp = svga_in(dev->on ? 0x2ea : 0x3c6, svga);
temp = svga_in((dev && dev->on) ? 0x2ea : 0x3c6, svga);
break;
case 3:
temp = svga_in(dev->on ? 0x2eb : 0x3c7, svga);
temp = svga_in((dev && dev->on) ? 0x2eb : 0x3c7, svga);
break;
case 4:
case 8: