Merge branch 'master' of https://github.com/86Box/86Box.git into EngiNerd

This commit is contained in:
EngiNerd89
2021-02-11 20:10:43 +01:00
25 changed files with 257 additions and 90 deletions

View File

@@ -17,15 +17,10 @@ add_library(chipset OBJECT acc2168.c cs8230.c ali1217.c ali1429.c headland.c int
cs4031.c intel_420ex.c intel_4x0.c intel_sio.c intel_piix.c ../ioapic.c
neat.c opti495.c opti895.c opti5x7.c scamp.c scat.c via_vt82c49x.c
via_vt82c505.c sis_85c310.c sis_85c4xx.c sis_85c496.c sis_85c50x.c
gc100.c
olivetti_eva.c
gc100.c olivetti_eva.c stpc.c
opti283.c opti291.c via_apollo.c via_pipc.c wd76c10.c
vl82c480.c)
if(STPC)
target_sources(chipset PRIVATE stpc.c)
endif()
if(M1489)
target_sources(chipset PRIVATE ali1489.c)
endif()

View File

@@ -6,7 +6,7 @@
*
* This file is part of the 86Box distribution.
*
* Implementation of the ALi M6117D SoC.
* Implementation of the ALi M6117 SoC.
*
*
*
@@ -34,6 +34,7 @@
#include <86box/port_92.h>
#include <86box/usb.h>
#include <86box/hdc.h>
#include <86box/hdc_ide.h>
#include <86box/chipset.h>
@@ -77,7 +78,7 @@ ali6117_recalcmapping(ali6117_t *dev)
shadowbios = 0;
shadowbios_write = 0;
ali6117_log("ALI6117: Shadowing for a0000-bffff (reg 12) = %s\n", (dev->regs[0x12] & 0x02) ? "on" : "off");
ali6117_log("ALI6117: Shadowing for A0000-BFFFF (reg 12 bit 1) = %s\n", (dev->regs[0x12] & 0x02) ? "on" : "off");
mem_set_mem_state(0xa0000, 0x20000, (dev->regs[0x12] & 0x02) ? (MEM_WRITE_INTERNAL | MEM_READ_INTERNAL) : (MEM_WRITE_EXTANY | MEM_READ_EXTANY));
for (reg = 0; reg <= 1; reg++) {
@@ -149,7 +150,7 @@ ali6117_reg_write(uint16_t addr, uint8_t val, void *priv)
case 0x20:
val &= 0xbf;
refresh_at_enable = (val & 0x02);
refresh_at_enable = !!(val & 0x80);
break;
case 0x31:
@@ -175,8 +176,11 @@ ali6117_reg_write(uint16_t addr, uint8_t val, void *priv)
break;
case 0x3c:
/* TODO: IDE channel selection (bit 0, secondary if set) */
val &= 0x8f;
ide_pri_disable();
ide_set_base(1, (val & 0x01) ? 0x170 : 0x1f0);
ide_set_side(1, (val & 0x01) ? 0x376 : 0x3f6);
ide_pri_enable();
break;
case 0x44: case 0x45: