From 92616e7b1da7332fa9085a2cf681c692906a1aa4 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Tue, 19 May 2020 21:15:25 -0300 Subject: [PATCH 01/35] Onboard audio device support + onboard ES1371 for Tsunami ATX --- src/hwm_lm78.c | 10 ++++++---- src/include/86box/machine.h | 12 ++++++++++-- src/include/86box/pci.h | 4 +++- src/include/86box/sound.h | 7 +++++++ src/machine/m_at_slot1.c | 30 +++++++++++++++++++++--------- src/machine/machine_table.c | 2 +- src/pci.c | 9 +++++---- src/sound/snd_audiopci.c | 36 +++++++++++++++++++++++++----------- src/sound/sound.c | 7 ++++++- 9 files changed, 84 insertions(+), 33 deletions(-) diff --git a/src/hwm_lm78.c b/src/hwm_lm78.c index 2cac22881..e303779a7 100644 --- a/src/hwm_lm78.c +++ b/src/hwm_lm78.c @@ -180,11 +180,11 @@ lm78_read(lm78_t *dev, uint8_t reg, uint8_t bank) uint8_t ret = 0; lm75_t *lm75; - if (((reg >> 4) == 0x5) && (bank != 0)) { + if (((reg & 0xf0) == 0x50) && (bank != 0)) { /* LM75 registers */ lm75 = device_get_priv(dev->lm75[bank - 1]); if (lm75) - ret = lm75_read(lm75, reg & 0x7); + ret = lm75_read(lm75, reg & 0xf); } else { /* regular registers */ if ((reg == 0x4f) && (dev->local & LM78_WINBOND)) /* special case for two-byte vendor ID register */ @@ -260,11 +260,11 @@ lm78_write(lm78_t *dev, uint8_t reg, uint8_t val, uint8_t bank) lm78_log("LM78: write(%02X, %d, %02X)\n", reg, bank, val); - if (((reg >> 4) == 0x5) && (bank != 0)) { + if (((reg & 0xf0) == 0x50) && (bank != 0)) { /* LM75 registers */ lm75 = device_get_priv(dev->lm75[bank - 1]); if (lm75) - lm75_write(lm75, reg & 0x7, val); + lm75_write(lm75, reg & 0xf, val); return 1; } @@ -325,6 +325,8 @@ lm78_write(lm78_t *dev, uint8_t reg, uint8_t val, uint8_t bank) if (dev->local & LM78_SMBUS) { for (uint8_t i = 0; i <= 1; i++) { lm75 = device_get_priv(dev->lm75[i]); + if (!lm75) + continue; if (dev->regs[0x4a] & (0x08 * (0x10 * i))) /* DIS_T2 and DIS_T3 bit disable those interfaces */ lm75->smbus_addr = 0x00; else diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index c0cad810d..097ae98dd 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -38,7 +38,8 @@ #define MACHINE_VIDEO 0x002000 /* sys has int video */ #define MACHINE_VIDEO_FIXED 0x004000 /* sys has ONLY int video */ #define MACHINE_MOUSE 0x008000 /* sys has int mouse */ -#define MACHINE_NONMI 0x010000 /* sys does not have NMI's */ +#define MACHINE_SOUND 0x010000 /* sys has int sound */ +#define MACHINE_NONMI 0x020000 /* sys does not have NMI's */ #else #define MACHINE_PC 0x000000 /* PC architecture */ #define MACHINE_AT 0x000001 /* PC/AT architecture */ @@ -54,7 +55,8 @@ #define MACHINE_VIDEO 0x002000 /* sys has int video */ #define MACHINE_VIDEO_FIXED 0x004000 /* sys has ONLY int video */ #define MACHINE_MOUSE 0x008000 /* sys has int mouse */ -#define MACHINE_NONMI 0x010000 /* sys does not have NMI's */ +#define MACHINE_SOUND 0x010000 /* sys has int sound */ +#define MACHINE_NONMI 0x020000 /* sys does not have NMI's */ #endif #define IS_ARCH(m, a) (machines[(m)].flags & (a)) ? 1 : 0; @@ -349,6 +351,12 @@ extern int machine_at_tsunamiatx_init(const machine_t *); #endif extern int machine_at_p6sba_init(const machine_t *); +#ifdef EMU_DEVICE_H +#if defined(DEV_BRANCH) && defined(NO_SIO) +extern const device_t *at_tsunamiatx_get_device(void); +#endif +#endif + /* m_at_slot2.c */ #if defined(DEV_BRANCH) && defined(NO_SIO) extern int machine_at_s2dge_init(const machine_t *); diff --git a/src/include/86box/pci.h b/src/include/86box/pci.h index 8063e27c9..edb6a5e57 100644 --- a/src/include/86box/pci.h +++ b/src/include/86box/pci.h @@ -51,6 +51,7 @@ enum { PCI_CARD_NORMAL, PCI_CARD_ONBOARD, PCI_CARD_SCSI, + PCI_CARD_SOUND, PCI_CARD_SPECIAL }; @@ -59,7 +60,8 @@ enum { PCI_ADD_SOUTHBRIDGE, PCI_ADD_NORMAL, PCI_ADD_VIDEO, - PCI_ADD_SCSI + PCI_ADD_SCSI, + PCI_ADD_SOUND }; typedef union { diff --git a/src/include/86box/sound.h b/src/include/86box/sound.h index 84b32d9a8..a47d97191 100644 --- a/src/include/86box/sound.h +++ b/src/include/86box/sound.h @@ -28,6 +28,12 @@ extern int sound_gain; #define CD_BUFLEN (CD_FREQ / 10) +enum { + SOUND_NONE = 0, + SOUND_INTERNAL +}; + + extern int ppispeakon; extern int gated, speakval, @@ -79,6 +85,7 @@ extern const device_t azt1605_device; /* Ensoniq AudioPCI */ extern const device_t es1371_device; +extern const device_t es1371_onboard_device; /* Creative Labs Game Blaster */ extern const device_t cms_device; diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 436a522f5..d9ad75310 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -40,6 +40,7 @@ #include <86box/video.h> #include "cpu.h" #include <86box/machine.h> +#include <86box/sound.h> int machine_at_p65up5_cpknd_init(const machine_t *model) @@ -335,9 +336,9 @@ machine_at_p6sba_init(const machine_t *model) int machine_at_tsunamiatx_init(const machine_t *model) { - //AMI 440BX Board. Requires the PC87309 and - //doesn't like the i686 CPU's - + /* AMI 440BX board. Requires the PC87309 + and doesn't like the i686 CPUs */ + int ret; ret = bios_load_linear(L"roms/machines/tsunamiatx/bx46200f.rom", @@ -350,20 +351,31 @@ machine_at_tsunamiatx_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0F, PCI_CARD_SOUND, 1, 0, 0, 0); + pci_register_slot(0x10, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x11, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x13, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x0F, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x01, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_NORMAL, 1, 2, 3, 4); device_add(&i440bx_device); device_add(&piix4e_device); - device_add(&pc87306_device); //PC87309 + + if (sound_card_current == SOUND_INTERNAL) + device_add(&es1371_onboard_device); + + device_add(&pc87306_device); /* PC87309 */ device_add(&keyboard_ps2_ami_pci_device); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x7, 256); return ret; } -#endif \ No newline at end of file + +const device_t * +at_tsunamiatx_get_device(void) +{ + return &es1371_onboard_device; +} +#endif diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index cce8106a9..1236e2398 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -307,7 +307,7 @@ const machine_t machines[] = { { "[Slot 1 BX] ASUS P3B-F", "p3bf", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_p3bf_init, NULL }, { "[Slot 1 BX] ABit BF6", "bf6", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_bf6_init, NULL }, #if defined(DEV_BRANCH) && defined(NO_SIO) - { "[Slot 1 BX] Tyan Tsunami ATX", "tsunamiatx", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_tsunamiatx_init, NULL }, + { "[Slot 1 BX] Tyan Tsunami ATX", "tsunamiatx", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_SOUND, 8, 1024, 8, 255, machine_at_tsunamiatx_init, at_tsunamiatx_get_device }, #endif { "[Slot 1 BX] Supermicro P6SBA", "p6sba", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_p6sba_init, NULL }, diff --git a/src/pci.c b/src/pci.c index 1e142a554..283cffedc 100644 --- a/src/pci.c +++ b/src/pci.c @@ -809,12 +809,12 @@ pci_add_card(uint8_t add_type, uint8_t (*read)(int func, int addr, void *priv), pci_log("pci_add_card(): Adding PCI CARD at specific slot %02X [SPECIFIC]\n", add_type); if (! PCI) { - pci_log("pci_add_card(): Adding PCI CARD failed (non-PCI machine) [%s]\n", (add_type == PCI_ADD_NORMAL) ? "NORMAL" : ((add_type == PCI_ADD_VIDEO) ? "VIDEO" : ((add_type == PCI_ADD_SCSI) ? "SCSI" : "SPECIFIC"))); + pci_log("pci_add_card(): Adding PCI CARD failed (non-PCI machine) [%s]\n", (add_type == PCI_ADD_NORMAL) ? "NORMAL" : ((add_type == PCI_ADD_VIDEO) ? "VIDEO" : ((add_type == PCI_ADD_SCSI) ? "SCSI" : ((add_type == PCI_ADD_SOUND) ? "SOUND" : "SPECIFIC")))); return 0xff; } if (! last_pci_card) { - pci_log("pci_add_card(): Adding PCI CARD failed (no PCI slots) [%s]\n", (add_type == PCI_ADD_NORMAL) ? "NORMAL" : ((add_type == PCI_ADD_VIDEO) ? "VIDEO" : ((add_type == PCI_ADD_SCSI) ? "SCSI" : "SPECIFIC"))); + pci_log("pci_add_card(): Adding PCI CARD failed (no PCI slots) [%s]\n", (add_type == PCI_ADD_NORMAL) ? "NORMAL" : ((add_type == PCI_ADD_VIDEO) ? "VIDEO" : ((add_type == PCI_ADD_SCSI) ? "SCSI" : ((add_type == PCI_ADD_SOUND) ? "SOUND" : "SPECIFIC")))); return 0xff; } @@ -825,19 +825,20 @@ pci_add_card(uint8_t add_type, uint8_t (*read)(int func, int addr, void *priv), if (((dev->type == PCI_CARD_NORMAL) && (add_type >= PCI_ADD_NORMAL)) || ((dev->type == PCI_CARD_ONBOARD) && (add_type == PCI_ADD_VIDEO)) || ((dev->type == PCI_CARD_SCSI) && (add_type == PCI_ADD_SCSI)) || + ((dev->type == PCI_CARD_SOUND) && (add_type == PCI_ADD_SOUND)) || ((dev->type == PCI_CARD_NORTHBRIDGE) && (add_type == PCI_ADD_NORTHBRIDGE)) || ((dev->type == PCI_CARD_SOUTHBRIDGE) && (add_type == PCI_ADD_SOUTHBRIDGE)) || ((dev->id == add_type) && (add_type < PCI_ADD_NORTHBRIDGE))) { dev->read = read; dev->write = write; dev->priv = priv; - pci_log("pci_add_card(): Adding PCI CARD to pci_cards[%i] (slot %02X) [%s]\n", i, dev->id, (add_type == PCI_ADD_NORMAL) ? "NORMAL" : ((add_type == PCI_ADD_VIDEO) ? "VIDEO" : ((add_type == PCI_ADD_SCSI) ? "SCSI" : "SPECIFIC"))); + pci_log("pci_add_card(): Adding PCI CARD to pci_cards[%i] (slot %02X) [%s]\n", i, dev->id, (add_type == PCI_ADD_NORMAL) ? "NORMAL" : ((add_type == PCI_ADD_VIDEO) ? "VIDEO" : ((add_type == PCI_ADD_SCSI) ? "SCSI" : ((add_type == PCI_ADD_SOUND) ? "SOUND" : "SPECIFIC")))); return dev->id; } } } - pci_log("pci_add_card(): Adding PCI CARD failed (unable to find a suitable PCI slot) [%s]\n", (add_type == PCI_ADD_NORMAL) ? "NORMAL" : ((add_type == PCI_ADD_VIDEO) ? "VIDEO" : ((add_type == PCI_ADD_SCSI) ? "SCSI" : "SPECIFIC"))); + pci_log("pci_add_card(): Adding PCI CARD failed (unable to find a suitable PCI slot) [%s]\n", (add_type == PCI_ADD_NORMAL) ? "NORMAL" : ((add_type == PCI_ADD_VIDEO) ? "VIDEO" : ((add_type == PCI_ADD_SCSI) ? "SCSI" : ((add_type == PCI_ADD_SOUND) ? "SOUND" : "SPECIFIC")))); return 0xff; } diff --git a/src/sound/snd_audiopci.c b/src/sound/snd_audiopci.c index e44694430..250de39d1 100644 --- a/src/sound/snd_audiopci.c +++ b/src/sound/snd_audiopci.c @@ -1313,7 +1313,7 @@ static void *es1371_init(const device_t *info) sound_add_handler(es1371_get_buffer, es1371); - es1371->card = pci_add_card(PCI_ADD_NORMAL, es1371_pci_read, es1371_pci_write, es1371); + es1371->card = pci_add_card(info->local ? PCI_ADD_SOUND : PCI_ADD_NORMAL, es1371_pci_read, es1371_pci_write, es1371); timer_add(&es1371->dac[1].timer, es1371_poll, es1371, 1); @@ -1382,14 +1382,28 @@ void es1371_add_status_info_dac(es1371_t *es1371, char *s, int max_len, int dac_ const device_t es1371_device = { - "Ensoniq AudioPCI (ES1371)", - DEVICE_PCI, - 0, - es1371_init, - es1371_close, - NULL, - NULL, - es1371_speed_changed, - NULL, - NULL + "Ensoniq AudioPCI (ES1371)", + DEVICE_PCI, + 0, + es1371_init, + es1371_close, + NULL, + NULL, + es1371_speed_changed, + NULL, + NULL +}; + +const device_t es1371_onboard_device = +{ + "Ensoniq AudioPCI (ES1371) (On-Board)", + DEVICE_PCI, + 1, + es1371_init, + es1371_close, + NULL, + NULL, + es1371_speed_changed, + NULL, + NULL }; diff --git a/src/sound/sound.c b/src/sound/sound.c index 76206998e..0136a8a48 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -29,6 +29,7 @@ #include <86box/cdrom.h> #include <86box/hdc_ide.h> #include <86box/plat.h> +#include <86box/machine.h> #include <86box/sound.h> #include <86box/midi.h> #include <86box/snd_opl.h> @@ -79,6 +80,7 @@ static int cd_thread_enable = 0; static const SOUND_CARD sound_cards[] = { { "None", "none", NULL }, + { "Internal", "internal", NULL }, { "[ISA] Adlib", "adlib", &adlib_device }, { "[ISA] Adlib Gold", "adlibgold", &adgold_device }, { "[ISA] Aztech Sound Galaxy Pro 16 AB (Washington)", "azt2316a", &azt2316a_device }, @@ -126,6 +128,9 @@ sound_log(const char *fmt, ...) int sound_card_available(int card) { + if ((card == SOUND_INTERNAL) && !(machines[machine].flags & MACHINE_SOUND)) + return 0; + if (sound_cards[card].device) return device_available(sound_cards[card].device); @@ -181,7 +186,7 @@ sound_card_get_from_internal_name(char *s) void sound_card_init(void) { - if (sound_cards[sound_card_current].device) + if ((sound_card_current != SOUND_INTERNAL) && (sound_cards[sound_card_current].device)) /* skip internal sound card */ device_add(sound_cards[sound_card_current].device); } From f781d611ac7ebc472c6bffeea4ac967132a81c35 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Tue, 19 May 2020 21:23:25 -0300 Subject: [PATCH 02/35] Remove redundant check --- src/sound/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/sound.c b/src/sound/sound.c index 0136a8a48..f6ade1f98 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -186,7 +186,7 @@ sound_card_get_from_internal_name(char *s) void sound_card_init(void) { - if ((sound_card_current != SOUND_INTERNAL) && (sound_cards[sound_card_current].device)) /* skip internal sound card */ + if (sound_cards[sound_card_current].device) device_add(sound_cards[sound_card_current].device); } From fc28978370f8ab10e18d396fb49692a616638cf2 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 20 May 2020 20:35:55 +0200 Subject: [PATCH 03/35] Timer clean-up improvements and some mem.c sanity checks. --- src/mem.c | 12 ++++++------ src/network/network.c | 1 + src/timer.c | 15 ++++++++++++++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/mem.c b/src/mem.c index ddd6a2316..4fa0d435b 100644 --- a/src/mem.c +++ b/src/mem.c @@ -1678,9 +1678,9 @@ void mem_write_ramb_page(uint32_t addr, uint8_t val, page_t *p) { #ifdef USE_DYNAREC - if (val != p->mem[addr & 0xfff] || codegen_in_recompile) { + if ((p == NULL) || (p->mem == NULL) || (val != p->mem[addr & 0xfff]) || codegen_in_recompile) { #else - if (val != p->mem[addr & 0xfff]) { + if ((p == NULL) || (p->mem == NULL) || (val != p->mem[addr & 0xfff])) { #endif uint64_t mask = (uint64_t)1 << ((addr >> PAGE_MASK_SHIFT) & PAGE_MASK_MASK); p->dirty_mask[(addr >> PAGE_MASK_INDEX_SHIFT) & PAGE_MASK_INDEX_MASK] |= mask; @@ -1693,9 +1693,9 @@ void mem_write_ramw_page(uint32_t addr, uint16_t val, page_t *p) { #ifdef USE_DYNAREC - if (val != *(uint16_t *)&p->mem[addr & 0xfff] || codegen_in_recompile) { + if ((p == NULL) || (p->mem == NULL) || (val != *(uint16_t *)&p->mem[addr & 0xfff]) || codegen_in_recompile) { #else - if (val != *(uint16_t *)&p->mem[addr & 0xfff]) { + if ((p == NULL) || (p->mem == NULL) || (val != *(uint16_t *)&p->mem[addr & 0xfff])) { #endif uint64_t mask = (uint64_t)1 << ((addr >> PAGE_MASK_SHIFT) & PAGE_MASK_MASK); if ((addr & 0xf) == 0xf) @@ -1710,9 +1710,9 @@ void mem_write_raml_page(uint32_t addr, uint32_t val, page_t *p) { #ifdef USE_DYNAREC - if (val != *(uint32_t *)&p->mem[addr & 0xfff] || codegen_in_recompile) { + if ((p == NULL) || (p->mem == NULL) || (val != *(uint32_t *)&p->mem[addr & 0xfff]) || codegen_in_recompile) { #else - if (val != *(uint32_t *)&p->mem[addr & 0xfff]) { + if ((p == NULL) || (p->mem == NULL) || (val != *(uint32_t *)&p->mem[addr & 0xfff])) { #endif uint64_t mask = (uint64_t)1 << ((addr >> PAGE_MASK_SHIFT) & PAGE_MASK_MASK); if ((addr & 0xf) >= 0xd) diff --git a/src/network/network.c b/src/network/network.c index cd6f00df8..a32f232c1 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -350,6 +350,7 @@ network_attach(void *dev, uint8_t *mac, NETRXCB rx, NETWAITCB wait, NETSETLINKST first_pkt[0] = first_pkt[1] = NULL; last_pkt[0] = last_pkt[1] = NULL; + memset(&network_rx_queue_timer, 0x00, sizeof(pc_timer_t)); timer_add(&network_rx_queue_timer, network_rx_queue, NULL, 0); /* 10 mbps. */ timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0); diff --git a/src/timer.c b/src/timer.c index e7967e652..9d88c67e0 100644 --- a/src/timer.c +++ b/src/timer.c @@ -110,8 +110,10 @@ timer_remove_head(void) if (timer_head) { timer = timer_head; timer_head = timer->next; - if (timer_head) + if (timer_head) { timer_head->prev = NULL; + timer->next->prev = NULL; + } timer->next = timer->prev = NULL; timer->flags &= ~TIMER_ENABLED; } @@ -151,6 +153,17 @@ timer_process(void) void timer_close(void) { + pc_timer_t *t = timer_head, *r; + + /* Set all timers' prev and next to NULL so it is assured that + timers that are not in malloc'd structs don't keep pointing + to timers that may be in malloc'd structs. */ + while (t != NULL) { + r = t; + r->prev = r->next = NULL; + t = r->next; + } + timer_head = NULL; timer_inited = 0; From 342f3b6709388b0e6bf36c58f7e3fa523c67c011 Mon Sep 17 00:00:00 2001 From: nerd73 Date: Wed, 20 May 2020 17:13:36 -0600 Subject: [PATCH 04/35] Replace the P55XB2 with the NuPRO-592, as it also has ACPI. --- src/include/86box/machine.h | 4 +-- src/machine/m_at_socket7_s7.c | 58 ++++++++++++++++++++++++++++------- src/machine/machine_table.c | 2 +- 3 files changed, 49 insertions(+), 15 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index c0cad810d..c1123704f 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -298,9 +298,7 @@ extern int machine_at_i430vx_init(const machine_t *); extern int machine_at_brio80xx_init(const machine_t *); extern int machine_at_pb680_init(const machine_t *); -#if defined(DEV_BRANCH) && defined(NO_SIO) -extern int machine_at_p55xb2_init(const machine_t *); -#endif +extern int machine_at_nupro592_init(const machine_t *); extern int machine_at_tx97_init(const machine_t *); extern int machine_at_ym430tx_init(const machine_t *); #if defined(DEV_BRANCH) && defined(NO_SIO) diff --git a/src/machine/m_at_socket7_s7.c b/src/machine/m_at_socket7_s7.c index c4792518c..de015103b 100644 --- a/src/machine/m_at_socket7_s7.c +++ b/src/machine/m_at_socket7_s7.c @@ -619,14 +619,14 @@ machine_at_pb680_init(const machine_t *model) return ret; } -#if defined(DEV_BRANCH) && defined(NO_SIO) + int -machine_at_p55xb2_init(const machine_t *model) +machine_at_nupro592_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p55xb2/XB20721.BIN", - 0x000e0000, 131072, 0); + ret = bios_load_linear(L"roms/machines/nupro592/np590b10.bin", + 0x000c0000, 262144, 0); if (bios_only || !ret) return ret; @@ -635,21 +635,57 @@ machine_at_p55xb2_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x11, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x13, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x14, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); /*Strongly suspect these are on-board slots*/ + pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 4); /* PIIX4 */ device_add(&i430tx_device); device_add(&piix4_device); device_add(&keyboard_ps2_pci_device); -// device_add(&ali_m513x_device); + device_add(&w83977ef_device); device_add(&intel_flash_bxt_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); - + + hwm_values_t machine_hwm = { + { /* fan speeds */ + 3000, /* Chassis */ + 3000, /* CPU */ + 3000, /* Power */ + 0 + }, { /* temperatures */ + 30, /* MB */ + 0, /* unused */ + 27, /* CPU */ + 0 + }, { /* voltages */ + 3300, /* VCORE (3.3V by default) */ + 0, /* unused */ + 3300, /* +3.3V */ + RESISTOR_DIVIDER(5000, 11, 16), /* +5V (divider values bruteforced) */ + RESISTOR_DIVIDER(12000, 28, 10), /* +12V (28K/10K divider suggested in the W83781D datasheet) */ + RESISTOR_DIVIDER(12000, 853, 347), /* -12V (divider values bruteforced) */ + RESISTOR_DIVIDER(5000, 1, 2), /* -5V (divider values bruteforced) */ + 0 + } + }; + /* Pentium, Pentium OverDrive MMX, Pentium Mobile MMX: 3.3V (real Pentium Mobile MMX is 2.45V). + Pentium MMX: 2.8 V. + AMD K6 Model 6: 2.9 V for 166/200, 3.2 V for 233. + AMD K6 Model 7: 2.2 V. */ + if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_PENTIUMMMX) + machine_hwm.voltages[0] = 2800; /* set higher VCORE (2.8V) for Pentium MMX */ + else if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_K6) + machine_hwm.voltages[0] = 2200; /* set higher VCORE (2.8V) for Pentium MMX */ + else if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_K6_2) + machine_hwm.voltages[0] = 2200; /* set higher VCORE (2.8V) for Pentium MMX */ + hwm_set_values(machine_hwm); + device_add(&w83781d_device); + return ret; } -#endif int machine_at_tx97_init(const machine_t *model) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index cce8106a9..5290e17b5 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -257,13 +257,13 @@ const machine_t machines[] = { { "[Socket 7 VX] Packard Bell PB680", "pb680", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 128, 8, 127, machine_at_pb680_init, NULL }, /* 430TX */ + { "[Socket 7 TX] ADLink NuPRO-592", "nupro592", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_nupro592_init, NULL }, { "[Socket 7 TX] ASUS TX97", "tx97", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_tx97_init, NULL }, #if defined(DEV_BRANCH) && defined(NO_SIO) { "[Socket 7 TX] Gigabyte GA-586T2", "586t2", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_586t2_init, NULL }, #endif { "[Socket 7 TX] Intel YM430TX", "ym430tx", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_ym430tx_init, NULL }, #if defined(DEV_BRANCH) && defined(NO_SIO) - { "[Socket 7 TX] Iwill P55XB2", "p55xb2", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_p55xb2_init, NULL }, { "[Socket 7 TX] PC Partner TXA807DS", "807ds", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_807ds_init, NULL }, #endif { "[Socket 7 TX] Supermicro P5MMS98", "p5mms98", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_p5mms98_init, NULL }, From eb56bc714c3b7039a17ca0c87fa1d456490f9ac0 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 21 May 2020 19:42:06 -0300 Subject: [PATCH 05/35] Fix hardware monitor mistake preventing P3B-F/CUBX from booting --- src/hwm_lm75.c | 4 ++-- src/hwm_lm78.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hwm_lm75.c b/src/hwm_lm75.c index 0d937c194..8463fbc78 100644 --- a/src/hwm_lm75.c +++ b/src/hwm_lm75.c @@ -128,7 +128,7 @@ lm75_read(lm75_t *dev, uint8_t reg) /* The AS99127F hardware monitor uses the addresses of its LM75 devices to access some of its proprietary registers. Pass this operation on to the main monitor address through an internal SMBus call, if necessary. */ - if ((reg >= 0x80) && (dev->as99127f_smbus_addr)) + if (((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr)) ret = smbus_read_byte_cmd(dev->as99127f_smbus_addr, reg); else ret = dev->regs[reg & 0x7]; @@ -191,7 +191,7 @@ lm75_write(lm75_t *dev, uint8_t reg, uint8_t val) /* The AS99127F hardware monitor uses the addresses of its LM75 devices to access some of its proprietary registers. Pass this operation on to the main monitor address through an internal SMBus call, if necessary. */ - if ((reg >= 0x80) && (dev->as99127f_smbus_addr)) { + if (((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr)) { smbus_write_byte_cmd(dev->as99127f_smbus_addr, reg, val); return 1; } diff --git a/src/hwm_lm78.c b/src/hwm_lm78.c index e303779a7..bf474db9e 100644 --- a/src/hwm_lm78.c +++ b/src/hwm_lm78.c @@ -180,11 +180,11 @@ lm78_read(lm78_t *dev, uint8_t reg, uint8_t bank) uint8_t ret = 0; lm75_t *lm75; - if (((reg & 0xf0) == 0x50) && (bank != 0)) { + if (((reg & 0xf8) == 0x50) && (bank != 0)) { /* LM75 registers */ lm75 = device_get_priv(dev->lm75[bank - 1]); if (lm75) - ret = lm75_read(lm75, reg & 0xf); + ret = lm75_read(lm75, reg); } else { /* regular registers */ if ((reg == 0x4f) && (dev->local & LM78_WINBOND)) /* special case for two-byte vendor ID register */ @@ -192,7 +192,7 @@ lm78_read(lm78_t *dev, uint8_t reg, uint8_t bank) else if ((reg >= 0x60) && (reg <= 0x7f)) /* read auto-increment value RAM registers from their non-auto-increment locations */ ret = dev->regs[reg & 0x3f]; else if ((reg >= 0x80) && (reg <= 0x92)) /* AS99127F mirrors [0x00:0x12] to [0x80:0x92] */ - ret = dev->regs[reg - 0x7f]; + ret = dev->regs[reg & 0x7f]; else ret = dev->regs[reg]; } @@ -260,11 +260,11 @@ lm78_write(lm78_t *dev, uint8_t reg, uint8_t val, uint8_t bank) lm78_log("LM78: write(%02X, %d, %02X)\n", reg, bank, val); - if (((reg & 0xf0) == 0x50) && (bank != 0)) { + if (((reg & 0xf8) == 0x50) && (bank != 0)) { /* LM75 registers */ lm75 = device_get_priv(dev->lm75[bank - 1]); if (lm75) - lm75_write(lm75, reg & 0xf, val); + lm75_write(lm75, reg, val); return 1; } From 0a48dbcfcdde6eb5117323d509407049aad89968 Mon Sep 17 00:00:00 2001 From: tiseno100 <58827426+tiseno100@users.noreply.github.com> Date: Fri, 22 May 2020 17:41:42 +0300 Subject: [PATCH 06/35] Machine path reorganisation The machine roms have been reorganized according to class(8086 - 286), CPU model (286 - 486) & Socket(Socket 4 - PGA370). Few exceptions are some manufacturer ROMs --- src/machine/m_amstrad.c | 42 +++++++++--------- src/machine/m_at.c | 24 +++++----- src/machine/m_at_286_386sx.c | 54 +++++++++++------------ src/machine/m_at_386dx_486.c | 38 ++++++++-------- src/machine/m_at_commodore.c | 4 +- src/machine/m_at_compaq.c | 12 ++--- src/machine/m_at_slot1.c | 14 +++--- src/machine/m_at_slot2.c | 2 +- src/machine/m_at_socket370.c | 10 ++--- src/machine/m_at_socket4_5.c | 41 +++++++++--------- src/machine/m_at_socket7_s7.c | 82 +++++++++++++++++------------------ src/machine/m_at_socket8.c | 8 ++-- src/machine/m_at_super7_ss7.c | 4 +- src/machine/m_europc.c | 2 +- src/machine/m_ps1.c | 10 ++--- src/machine/m_ps2_isa.c | 2 +- src/machine/m_ps2_mca.c | 24 +++++----- src/machine/m_tandy.c | 16 +++---- src/machine/m_xt.c | 50 ++++++++++----------- src/machine/m_xt_compaq.c | 2 +- src/machine/m_xt_laserxt.c | 4 +- src/machine/m_xt_t1000.c | 10 ++--- src/machine/m_xt_xi8088.c | 8 ++-- src/machine/m_xt_zenith.c | 2 +- src/machine/machine_table.c | 1 + 25 files changed, 233 insertions(+), 233 deletions(-) diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index 46cf9a215..76fcf83f4 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -844,7 +844,7 @@ vid_init_1640(amstrad_t *ams) vid = (amsvid_t *)malloc(sizeof(amsvid_t)); memset(vid, 0x00, sizeof(amsvid_t)); - rom_init(&vid->bios_rom, L"roms/machines/pc1640/40100", + rom_init(&vid->bios_rom, L"roms/machines/amstrad/pc1640/40100", 0xc0000, 0x8000, 0x7fff, 0, 0); ega_init(&vid->ega, 9, 0); @@ -2435,7 +2435,7 @@ machine_amstrad_init(const machine_t *model, int type) if (gfxcard == VID_INTERNAL) switch(type) { case AMS_PC1512: - loadfont(L"roms/machines/pc1512/40078", 8); + loadfont(L"roms/machines/amstrad/pc1512/40078", 8); device_context(&vid_1512_device); ams->language = device_get_config_int("language"); vid_init_1512(ams); @@ -2444,7 +2444,7 @@ machine_amstrad_init(const machine_t *model, int type) break; case AMS_PPC512: - loadfont(L"roms/machines/ppc512/40109", 1); + loadfont(L"roms/machines/amstrad/ppc512/40109", 1); device_context(&vid_ppc512_device); ams->language = device_get_config_int("language"); vid_init_200(ams); @@ -2462,7 +2462,7 @@ machine_amstrad_init(const machine_t *model, int type) break; case AMS_PC200: - loadfont(L"roms/machines/pc200/40109", 1); + loadfont(L"roms/machines/amstrad/pc200/40109", 1); device_context(&vid_200_device); ams->language = device_get_config_int("language"); vid_init_200(ams); @@ -2517,10 +2517,10 @@ machine_pc1512_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/pc1512/40044", - L"roms/machines/pc1512/40043", + ret = bios_load_interleaved(L"roms/machines/amstrad/pc1512/40044", + L"roms/machines/amstrad/pc1512/40043", 0x000fc000, 16384, 0); - ret &= rom_present(L"roms/machines/pc1512/40078"); + ret &= rom_present(L"roms/machines/amstrad/pc1512/40078"); if (bios_only || !ret) return ret; @@ -2536,10 +2536,10 @@ machine_pc1640_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/pc1640/40044.v3", - L"roms/machines/pc1640/40043.v3", + ret = bios_load_interleaved(L"roms/machines/amstrad/pc1640/40044.v3", + L"roms/machines/amstrad/pc1640/40043.v3", 0x000fc000, 16384, 0); - ret &= rom_present(L"roms/machines/pc1640/40100"); + ret &= rom_present(L"roms/machines/amstrad/pc1640/40100"); if (bios_only || !ret) return ret; @@ -2555,10 +2555,10 @@ machine_pc200_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/pc200/pc20v2.1", - L"roms/machines/pc200/pc20v2.0", + ret = bios_load_interleaved(L"roms/machines/amstrad/pc200/pc20v2.1", + L"roms/machines/amstrad/pc200/pc20v2.0", 0x000fc000, 16384, 0); - ret &= rom_present(L"roms/machines/pc200/40109"); + ret &= rom_present(L"roms/machines/amstrad/pc200/40109"); if (bios_only || !ret) return ret; @@ -2574,10 +2574,10 @@ machine_ppc512_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ppc512/40107.v2", - L"roms/machines/ppc512/40108.v2", + ret = bios_load_interleaved(L"roms/machines/amstrad/ppc512/40107.v2", + L"roms/machines/amstrad/ppc512/40108.v2", 0x000fc000, 16384, 0); - ret &= rom_present(L"roms/machines/ppc512/40109"); + ret &= rom_present(L"roms/machines/amstrad/ppc512/40109"); if (bios_only || !ret) return ret; @@ -2593,10 +2593,10 @@ machine_pc2086_init(const machine_t *model) { int ret; - ret = bios_load_interleavedr(L"roms/machines/pc2086/40179.ic129", - L"roms/machines/pc2086/40180.ic132", + ret = bios_load_interleavedr(L"roms/machines/amstrad/pc2086/40179.ic129", + L"roms/machines/amstrad/pc2086/40180.ic132", 0x000fc000, 65536, 0); - ret &= rom_present(L"roms/machines/pc2086/40186.ic171"); + ret &= rom_present(L"roms/machines/amstrad/pc2086/40186.ic171"); if (bios_only || !ret) return ret; @@ -2612,9 +2612,9 @@ machine_pc3086_init(const machine_t *model) { int ret; - ret = bios_load_linearr(L"roms/machines/pc3086/fc00.bin", + ret = bios_load_linearr(L"roms/machines/amstrad/pc3086/fc00.bin", 0x000fc000, 65536, 0); - ret &= rom_present(L"roms/machines/pc3086/c000.bin"); + ret &= rom_present(L"roms/machines/amstrad/pc3086/c000.bin"); if (bios_only || !ret) return ret; diff --git a/src/machine/m_at.c b/src/machine/m_at.c index 90f4fc40c..58d021086 100644 --- a/src/machine/m_at.c +++ b/src/machine/m_at.c @@ -156,8 +156,8 @@ machine_at_ibm_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmat/62x0820.u27", - L"roms/machines/ibmat/62x0821.u47", + ret = bios_load_interleaved(L"roms/machines/at/ibmat/62x0820.u27", + L"roms/machines/at/ibmat/62x0821.u47", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -174,8 +174,8 @@ machine_at_ibmatquadtel_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", - L"roms/machines/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", + ret = bios_load_interleaved(L"roms/machines/at/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", + L"roms/machines/at/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -191,8 +191,8 @@ machine_at_ibmatami_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", - L"roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", + ret = bios_load_interleaved(L"roms/machines/at/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", + L"roms/machines/at/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -208,8 +208,8 @@ machine_at_ibmatpx_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin", - L"roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin", + ret = bios_load_interleaved(L"roms/machines/at/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin", + L"roms/machines/at/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -225,8 +225,8 @@ machine_at_ibmxt286_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin", - L"roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin", + ret = bios_load_interleaved(L"roms/machines/at/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin", + L"roms/machines/at/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -243,7 +243,7 @@ machine_at_siemens_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/siemens/286BIOS.BIN", + ret = bios_load_linear(L"roms/machines/at/siemens/286BIOS.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -261,7 +261,7 @@ machine_at_open_at_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/open_at/bios.bin", + ret = bios_load_linear(L"roms/machines/at/open_at/bios.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_286_386sx.c b/src/machine/m_at_286_386sx.c index ddc349033..78b6c3df9 100644 --- a/src/machine/m_at_286_386sx.c +++ b/src/machine/m_at_286_386sx.c @@ -43,8 +43,8 @@ machine_at_mr286_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/mr286/V000B200-1", - L"roms/machines/mr286/V000B200-2", + ret = bios_load_interleaved(L"roms/machines/286_386sx/mr286/V000B200-1", + L"roms/machines/286_386sx/mr286/V000B200-2", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -77,7 +77,7 @@ machine_at_headland_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ami386/ami386.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/ami386/ami386.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -97,7 +97,7 @@ machine_at_tg286m_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/tg286m/ami.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/tg286m/ami.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -123,7 +123,7 @@ machine_at_ama932j_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ama932j/ami.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/ama932j/ami.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -144,8 +144,8 @@ machine_at_quadt286_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/quadt286/QUADT89L.ROM", - L"roms/machines/quadt286/QUADT89H.ROM", + ret = bios_load_interleaved(L"roms/machines/286_386sx/quadt286/QUADT89L.ROM", + L"roms/machines/286_386sx/quadt286/QUADT89H.ROM", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -164,7 +164,7 @@ machine_at_neat_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/dtk386/3cto001.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/dtk386/3cto001.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -184,7 +184,7 @@ machine_at_neat_ami_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ami286/amic206.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/ami286/amic206.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -205,7 +205,7 @@ machine_at_px286_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/px286/KENITEC.BIN", + ret = bios_load_linear(L"roms/machines/286_386sx/px286/KENITEC.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -225,8 +225,8 @@ machine_at_goldstar386_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/goldstar386/386-Goldstar-E.BIN", - L"roms/machines/goldstar386/386-Goldstar-O.BIN", + ret = bios_load_interleaved(L"roms/machines/286_386sx/goldstar386/386-Goldstar-E.BIN", + L"roms/machines/286_386sx/goldstar386/386-Goldstar-O.BIN", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -245,8 +245,8 @@ machine_at_micronics386_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/micronics386/386-Micronics-09-00021-EVEN.BIN", - L"roms/machines/micronics386/386-Micronics-09-00021-ODD.BIN", + ret = bios_load_interleaved(L"roms/machines/286_386sx/micronics386/386-Micronics-09-00021-EVEN.BIN", + L"roms/machines/286_386sx/micronics386/386-Micronics-09-00021-ODD.BIN", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -290,7 +290,7 @@ machine_at_award286_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/award286/award.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/award286/award.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -306,7 +306,7 @@ machine_at_gdc212m_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/gdc212m/gdc212m_72h.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/gdc212m/gdc212m_72h.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -322,7 +322,7 @@ machine_at_gw286ct_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/gw286ct/2ctc001.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/gw286ct/2ctc001.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -341,7 +341,7 @@ machine_at_super286tr_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/super286tr/hyundai_award286.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/super286tr/hyundai_award286.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -358,7 +358,7 @@ machine_at_spc4200p_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/spc4200p/u8.01", + ret = bios_load_linear(L"roms/machines/286_386sx/spc4200p/u8.01", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -375,8 +375,8 @@ machine_at_spc4216p_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/spc4216p/7101.u8", - L"roms/machines/spc4216p/ac64.u10", + ret = bios_load_interleaved(L"roms/machines/286_386sx/spc4216p/7101.u8", + L"roms/machines/286_386sx/spc4216p/ac64.u10", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -393,7 +393,7 @@ machine_at_kmxc02_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/kmxc02/3ctm005.bin", + ret = bios_load_linear(L"roms/machines/286_386sx/kmxc02/3ctm005.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -409,7 +409,7 @@ machine_at_deskmaster286_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/deskmaster286/SAMSUNG-DESKMASTER-28612-ROM.BIN", + ret = bios_load_linear(L"roms/machines/286_386sx/deskmaster286/SAMSUNG-DESKMASTER-28612-ROM.BIN", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -425,8 +425,8 @@ machine_at_wd76c10_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/megapc/41651-bios lo.u18", - L"roms/machines/megapc/211253-bios hi.u19", + ret = bios_load_interleaved(L"roms/machines/286_386sx/megapc/41651-bios lo.u18", + L"roms/machines/286_386sx/megapc/211253-bios hi.u19", 0x000f0000, 65536, 0x08000); if (bios_only || !ret) @@ -455,8 +455,8 @@ machine_at_commodore_sl386sx_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/cbm_sl386sx25/cbm-sl386sx-bios-lo-v1.04-390914-04.bin", - L"roms/machines/cbm_sl386sx25/cbm-sl386sx-bios-hi-v1.04-390915-04.bin", + ret = bios_load_interleaved(L"roms/machines/286_386sx/cbm_sl386sx25/cbm-sl386sx-bios-lo-v1.04-390914-04.bin", + L"roms/machines/286_386sx/cbm_sl386sx25/cbm-sl386sx-bios-hi-v1.04-390915-04.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 4bed55f9c..29221b51a 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -49,7 +49,7 @@ machine_at_acc386_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/acc386/acc386.BIN", + ret = bios_load_linear(L"roms/machines/386dx_486/acc386/acc386.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -68,8 +68,8 @@ machine_at_ecs386_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - L chip.bin", - L"roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - H chip.bin", + ret = bios_load_interleaved(L"roms/machines/386dx_486/ecs386/AMI BIOS for ECS-386_32 motherboard - L chip.bin", + L"roms/machines/386dx_486/ecs386/AMI BIOS for ECS-386_32 motherboard - H chip.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -88,7 +88,7 @@ machine_at_pb410a_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/pb410a/pb410a.080337.4abf.u25.bin", + ret = bios_load_linear(L"roms/machines/386dx_486/pb410a/pb410a.080337.4abf.u25.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -125,7 +125,7 @@ machine_at_ali1429_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ami486/ami486.bin", + ret = bios_load_linear(L"roms/machines/386dx_486/ami486/ami486.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -142,7 +142,7 @@ machine_at_winbios1429_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/win486/ali1429g.amw", + ret = bios_load_linear(L"roms/machines/386dx_486/win486/ali1429g.amw", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -159,7 +159,7 @@ machine_at_opti495_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/award495/opt495s.awa", + ret = bios_load_linear(L"roms/machines/386dx_486/award495/opt495s.awa", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -193,7 +193,7 @@ machine_at_opti495_ami_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ami495/opt495sx.ami", + ret = bios_load_linear(L"roms/machines/386dx_486/ami495/opt495sx.ami", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -210,7 +210,7 @@ machine_at_opti495_mr_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/mr495/opt495sx.mr", + ret = bios_load_linear(L"roms/machines/386dx_486/mr495/opt495sx.mr", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -237,7 +237,7 @@ machine_at_ami471_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ami471/SIS471BE.AMI", + ret = bios_load_linear(L"roms/machines/386dx_486/ami471/SIS471BE.AMI", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -255,7 +255,7 @@ machine_at_dtk486_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/dtk486/4siw005.bin", + ret = bios_load_linear(L"roms/machines/386dx_486/dtk486/4siw005.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -273,7 +273,7 @@ machine_at_px471_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/px471/SIS471A1.PHO", + ret = bios_load_linear(L"roms/machines/386dx_486/px471/SIS471A1.PHO", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -292,7 +292,7 @@ machine_at_win471_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/win471/486-SiS_AC0360136.BIN", + ret = bios_load_linear(L"roms/machines/386dx_486/win471/486-SiS_AC0360136.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -331,7 +331,7 @@ machine_at_r418_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/r418/r418i.bin", + ret = bios_load_linear(L"roms/machines/386dx_486/r418/r418i.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -354,7 +354,7 @@ machine_at_ls486e_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ls486e/LS486E RevC.BIN", + ret = bios_load_linear(L"roms/machines/386dx_486/ls486e/LS486E RevC.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -378,7 +378,7 @@ machine_at_4dps_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/4dps/4DPS172G.BIN", + ret = bios_load_linear(L"roms/machines/386dx_486/4dps/4DPS172G.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -401,8 +401,8 @@ machine_at_alfredo_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/alfredo/1010AQ0_.BIO", - L"roms/machines/alfredo/1010AQ0_.BI1", 0x1c000, 128); + ret = bios_load_linear_combined(L"roms/machines/386dx_486/alfredo/1010AQ0_.BIO", + L"roms/machines/386dx_486/alfredo/1010AQ0_.BI1", 0x1c000, 128); if (bios_only || !ret) return ret; @@ -433,7 +433,7 @@ machine_at_486sp3g_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/486sp3g/PCI-I-486SP3G_0306.001 (Beta).bin", + ret = bios_load_linear(L"roms/machines/386dx_486/486sp3g/PCI-I-486SP3G_0306.001 (Beta).bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_commodore.c b/src/machine/m_at_commodore.c index 51f8e56b4..3aa0a2332 100644 --- a/src/machine/m_at_commodore.c +++ b/src/machine/m_at_commodore.c @@ -97,8 +97,8 @@ machine_at_cmdpc_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/cmdpc30/commodore pc 30 iii even.bin", - L"roms/machines/cmdpc30/commodore pc 30 iii odd.bin", + ret = bios_load_interleaved(L"roms/machines/commodore/cmdpc30/commodore pc 30 iii even.bin", + L"roms/machines/commodore/cmdpc30/commodore pc 30 iii odd.bin", 0x000f8000, 32768, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_compaq.c b/src/machine/m_at_compaq.c index 7cd3f254e..e87167a9c 100644 --- a/src/machine/m_at_compaq.c +++ b/src/machine/m_at_compaq.c @@ -842,8 +842,8 @@ machine_at_portableii_init(const machine_t *model) { int ret; - ret = bios_load_interleavedr(L"roms/machines/portableii/109740-001.rom", - L"roms/machines/portableii/109739-001.rom", + ret = bios_load_interleavedr(L"roms/machines/compaq/portableii/109740-001.rom", + L"roms/machines/compaq/portableii/109739-001.rom", 0x000f8000, 65536, 0); if (bios_only || !ret) @@ -860,8 +860,8 @@ machine_at_portableiii_init(const machine_t *model) { int ret; - ret = bios_load_interleavedr(L"roms/machines/portableiii/Compaq Portable III - BIOS - 106779-002 - Even.bin", - L"roms/machines/portableiii/Compaq Portable III - BIOS - 106778-002 - Odd.bin", + ret = bios_load_interleavedr(L"roms/machines/compaq/portableiii/Compaq Portable III - BIOS - 106779-002 - Even.bin", + L"roms/machines/compaq/portableiii/Compaq Portable III - BIOS - 106778-002 - Odd.bin", 0x000f8000, 65536, 0); if (bios_only || !ret) @@ -878,8 +878,8 @@ machine_at_portableiii386_init(const machine_t *model) { int ret; - ret = bios_load_interleavedr(L"roms/machines/portableiii/Compaq Portable III - BIOS - 106779-002 - Even.bin", - L"roms/machines/portableiii/Compaq Portable III - BIOS - 106778-002 - Odd.bin", + ret = bios_load_interleavedr(L"roms/machines/compaq/portableiii/Compaq Portable III - BIOS - 106779-002 - Even.bin", + L"roms/machines/compaq/portableiii/Compaq Portable III - BIOS - 106778-002 - Odd.bin", 0x000f8000, 65536, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index d9ad75310..1fb640ce4 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -63,7 +63,7 @@ machine_at_p6kfx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p6kfx/kfxa22.bin", + ret = bios_load_linear(L"roms/machines/slot1/p6kfx/kfxa22.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -94,7 +94,7 @@ machine_at_6bxc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/6bxc/powleap.bin", + ret = bios_load_linear(L"roms/machines/slot1/6bxc/powleap.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -126,7 +126,7 @@ machine_at_p2bls_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p2bls/1014ls.003", + ret = bios_load_linear(L"roms/machines/slot1/p2bls/1014ls.003", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -183,7 +183,7 @@ machine_at_p3bf_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p3bf/bx3f1006.awd", + ret = bios_load_linear(L"roms/machines/slot1/p3bf/bx3f1006.awd", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -240,7 +240,7 @@ machine_at_bf6_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/bf6/Beh_70.bin", + ret = bios_load_linear(L"roms/machines/slot1/bf6/Beh_70.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -280,7 +280,7 @@ machine_at_p6sba_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/p6sba/SBAB21.ROM", + ret = bios_load_linear(L"roms/machines/slot1/p6sba/SBAB21.ROM", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -341,7 +341,7 @@ machine_at_tsunamiatx_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/tsunamiatx/bx46200f.rom", + ret = bios_load_linear(L"roms/machines/slot1/tsunamiatx/bx46200f.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_slot2.c b/src/machine/m_at_slot2.c index b85ce9a83..b1a095466 100644 --- a/src/machine/m_at_slot2.c +++ b/src/machine/m_at_slot2.c @@ -55,7 +55,7 @@ machine_at_s2dge_init(const machine_t *model) */ int ret; - ret = bios_load_linear(L"roms/machines/s2dge/2gu7301.rom", + ret = bios_load_linear(L"roms/machines/slot2/s2dge/2gu7301.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index 8852ee804..d8a3e3345 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -47,7 +47,7 @@ machine_at_s370slm_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/s370slm/3LM1202.rom", + ret = bios_load_linear(L"roms/machines/socket370/s370slm/3LM1202.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -103,7 +103,7 @@ machine_at_cubx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/cubx/1008cu.004", + ret = bios_load_linear(L"roms/machines/socket370/cubx/1008cu.004", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -158,7 +158,7 @@ machine_at_atc7020bxii_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/atc7020bxii/7020s102.bin", + ret = bios_load_linear(L"roms/machines/socket370/atc7020bxii/7020s102.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -191,7 +191,7 @@ machine_at_63a_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/63a1/63a-q3.bin", + ret = bios_load_linear(L"roms/machines/socket370/63a1/63a-q3.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -224,7 +224,7 @@ machine_at_apas3_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/apas3/V0218SAG.BIN", + ret = bios_load_linear(L"roms/machines/socket370/apas3/V0218SAG.BIN", 0x000c0000, 262144, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_socket4_5.c b/src/machine/m_at_socket4_5.c index 59e237567..a9a421984 100644 --- a/src/machine/m_at_socket4_5.c +++ b/src/machine/m_at_socket4_5.c @@ -42,7 +42,6 @@ #include <86box/video.h> #include <86box/machine.h> - static void machine_at_premiere_common_init(const machine_t *model) { @@ -90,8 +89,8 @@ machine_at_batman_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/revenge/1009af2_.bio", - L"roms/machines/revenge/1009af2_.bi1", 0x1c000, 128); + ret = bios_load_linear_combined(L"roms/machines/socket4_5/revenge/1009af2_.bio", + L"roms/machines/socket4_5/revenge/1009af2_.bi1", 0x1c000, 128); if (bios_only || !ret) return ret; @@ -109,8 +108,8 @@ machine_at_ambradp60_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/ambradp60/1004AF1P.BIO", - L"roms/machines/ambradp60/1004AF1P.BI1", 0x1c000, 128); + ret = bios_load_linear_combined(L"roms/machines/socket4_5/ambradp60/1004AF1P.BIO", + L"roms/machines/socket4_5/ambradp60/1004AF1P.BI1", 0x1c000, 128); if (bios_only || !ret) return ret; @@ -129,8 +128,8 @@ machine_at_valuepointp60_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/valuepointp60/1006AV0M.BIO", - L"roms/machines/valuepointp60/1006AV0M.BI1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/socket4_5/valuepointp60/1006AV0M.BIO", + L"roms/machines/socket4_5/valuepointp60/1006AV0M.BI1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -149,7 +148,7 @@ machine_at_586mc1_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/586mc1/IS.34", + ret = bios_load_linear(L"roms/machines/socket4_5/586mc1/IS.34", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -168,8 +167,8 @@ machine_at_plato_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/plato/1016ax1_.bio", - L"roms/machines/plato/1016ax1_.bi1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/socket4_5/plato/1016ax1_.bio", + L"roms/machines/socket4_5/plato/1016ax1_.bi1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -187,8 +186,8 @@ machine_at_ambradp90_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/ambradp90/1002AX1P.BIO", - L"roms/machines/ambradp90/1002AX1P.BI1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/socket4_5/ambradp90/1002AX1P.BIO", + L"roms/machines/socket4_5/ambradp90/1002AX1P.BI1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -206,7 +205,7 @@ machine_at_430nx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/430nx/IP.20", + ret = bios_load_linear(L"roms/machines/socket4_5/430nx/IP.20", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -225,7 +224,7 @@ machine_at_p54tp4xe_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p54tp4xe/t15i0302.awd", + ret = bios_load_linear(L"roms/machines/socket4_5/p54tp4xe/t15i0302.awd", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -256,8 +255,8 @@ machine_at_endeavor_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/endeavor/1006cb0_.bio", - L"roms/machines/endeavor/1006cb0_.bi1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/socket4_5/endeavor/1006cb0_.bio", + L"roms/machines/socket4_5/endeavor/1006cb0_.bi1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -298,8 +297,8 @@ machine_at_zappa_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/zappa/1006bs0_.bio", - L"roms/machines/zappa/1006bs0_.bi1", 0x20000, 128); + ret = bios_load_linear_combined(L"roms/machines/socket4_5/zappa/1006bs0_.bio", + L"roms/machines/socket4_5/zappa/1006bs0_.bi1", 0x20000, 128); if (bios_only || !ret) return ret; @@ -327,7 +326,7 @@ machine_at_mb500n_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/mb500n/031396s.bin", + ret = bios_load_linear(L"roms/machines/socket4_5/mb500n/031396s.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -357,7 +356,7 @@ machine_at_vectra54_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/vectra54/GT0724.22", + ret = bios_load_linear(L"roms/machines/socket4_5/vectra54/GT0724.22", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -388,7 +387,7 @@ machine_at_powermate_v_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/powermate_v/BIOS.ROM", + ret = bios_load_linear(L"roms/machines/socket4_5/powermate_v/BIOS.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_socket7_s7.c b/src/machine/m_at_socket7_s7.c index de015103b..ef4365f6a 100644 --- a/src/machine/m_at_socket7_s7.c +++ b/src/machine/m_at_socket7_s7.c @@ -50,7 +50,7 @@ machine_at_chariot_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/chariot/P5IV183.ROM", + ret = bios_load_linear(L"roms/machines/socket7/chariot/P5IV183.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -80,7 +80,7 @@ machine_at_mr586_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/mr586/TRITON.BIO", + ret = bios_load_linear(L"roms/machines/socket7/mr586/TRITON.BIO", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -131,8 +131,8 @@ machine_at_thor_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/thor/1006cn0_.bio", - L"roms/machines/thor/1006cn0_.bi1", 0x20000, 128); + ret = bios_load_linear_combined(L"roms/machines/socket7/thor/1006cn0_.bio", + L"roms/machines/socket7/thor/1006cn0_.bi1", 0x20000, 128); if (bios_only || !ret) return ret; @@ -148,7 +148,7 @@ machine_at_mrthor_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/mrthor/mr_atx.bio", + ret = bios_load_linear(L"roms/machines/socket7/mrthor/mr_atx.bio", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -165,8 +165,8 @@ machine_at_pb640_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/pb640/1007CP0R.BIO", - L"roms/machines/pb640/1007CP0R.BI1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/socket7/pb640/1007CP0R.BIO", + L"roms/machines/socket7/pb640/1007CP0R.BI1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -205,7 +205,7 @@ machine_at_acerm3a_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/acerm3a/r01-b3.bin", + ret = bios_load_linear(L"roms/machines/socket7/acerm3a/r01-b3.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -238,7 +238,7 @@ machine_at_acerv35n_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/acerv35n/v35nd1s1.bin", + ret = bios_load_linear(L"roms/machines/socket7/acerv35n/v35nd1s1.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -271,7 +271,7 @@ machine_at_ap53_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ap53/ap53r2c0.rom", + ret = bios_load_linear(L"roms/machines/socket7/ap53/ap53r2c0.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -302,7 +302,7 @@ machine_at_p55t2p4_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p55t2p4/0207_j2.bin", + ret = bios_load_linear(L"roms/machines/socket7/p55t2p4/0207_j2.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -332,7 +332,7 @@ machine_at_p55t2s_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p55t2s/s6y08t.rom", + ret = bios_load_linear(L"roms/machines/socket7/p55t2s/s6y08t.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -361,7 +361,7 @@ machine_at_m7shi_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/m7shi/m7shi2n.rom", + ret = bios_load_linear(L"roms/machines/socket7/m7shi/m7shi2n.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -390,11 +390,11 @@ machine_at_tc430hx_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined2(L"roms/machines/tc430hx/1007dh0_.bio", - L"roms/machines/tc430hx/1007dh0_.bi1", - L"roms/machines/tc430hx/1007dh0_.bi2", - L"roms/machines/tc430hx/1007dh0_.bi3", - L"roms/machines/tc430hx/1007dh0_.rcv", + ret = bios_load_linear_combined2(L"roms/machines/socket7/tc430hx/1007dh0_.bio", + L"roms/machines/socket7/tc430hx/1007dh0_.bi1", + L"roms/machines/socket7/tc430hx/1007dh0_.bi2", + L"roms/machines/socket7/tc430hx/1007dh0_.bi3", + L"roms/machines/socket7/tc430hx/1007dh0_.rcv", 0x3a000, 128); if (bios_only || !ret) @@ -425,11 +425,11 @@ machine_at_equium5200_init(const machine_t *model) // Information about that mac { int ret; - ret = bios_load_linear_combined2(L"roms/machines/equium5200/1003DK08.BIO", - L"roms/machines/equium5200/1003DK08.BI1", - L"roms/machines/equium5200/1003DK08.BI2", - L"roms/machines/equium5200/1003DK08.BI3", - L"roms/machines/equium5200/1003DK08.RCV", + ret = bios_load_linear_combined2(L"roms/machines/socket7/equium5200/1003DK08.BIO", + L"roms/machines/socket7/equium5200/1003DK08.BI1", + L"roms/machines/socket7/equium5200/1003DK08.BI2", + L"roms/machines/socket7/equium5200/1003DK08.BI3", + L"roms/machines/socket7/equium5200/1003DK08.RCV", 0x3a000, 128); if (bios_only || !ret) @@ -475,7 +475,7 @@ machine_at_p55tvp4_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p55tvp4/0204_128.BIN", + ret = bios_load_linear(L"roms/machines/socket7/p55tvp4/0204_128.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -504,7 +504,7 @@ machine_at_i430vx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/430vx/55xwuq0e.bin", + ret = bios_load_linear(L"roms/machines/socket7/430vx/55xwuq0e.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -533,7 +533,7 @@ machine_at_p55va_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p55va/va021297.bin", + ret = bios_load_linear(L"roms/machines/socket7/p55va/va021297.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -562,7 +562,7 @@ machine_at_brio80xx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/brio80xx/Hf0705.rom", + ret = bios_load_linear(L"roms/machines/socket7/brio80xx/Hf0705.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -591,11 +591,11 @@ machine_at_pb680_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined2(L"roms/machines/pb680/1012DN0R.BIO", - L"roms/machines/pb680/1012DN0R.BI1", - L"roms/machines/pb680/1012DN0R.BI2", - L"roms/machines/pb680/1012DN0R.BI3", - L"roms/machines/pb680/1012DN0R.RCV", + ret = bios_load_linear_combined2(L"roms/machines/socket7/pb680/1012DN0R.BIO", + L"roms/machines/socket7/pb680/1012DN0R.BI1", + L"roms/machines/socket7/pb680/1012DN0R.BI2", + L"roms/machines/socket7/pb680/1012DN0R.BI3", + L"roms/machines/socket7/pb680/1012DN0R.RCV", 0x3a000, 128); if (bios_only || !ret) @@ -625,7 +625,7 @@ machine_at_nupro592_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/nupro592/np590b10.bin", + ret = bios_load_linear(L"roms/machines/socket7/nupro592/np590b10.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -692,7 +692,7 @@ machine_at_tx97_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/tx97/0112.001", + ret = bios_load_linear(L"roms/machines/socket7/tx97/0112.001", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -760,7 +760,7 @@ machine_at_ym430tx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ym430tx/YM430TX.003", + ret = bios_load_linear(L"roms/machines/socket7/ym430tx/YM430TX.003", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -793,7 +793,7 @@ machine_at_586t2_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/586t2/5itw001.bin", + ret = bios_load_linear(L"roms/machines/socket7/586t2/5itw001.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -824,7 +824,7 @@ machine_at_807ds_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/807ds/Tx0212g.rom", + ret = bios_load_linear(L"roms/machines/socket7/807ds/Tx0212g.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -855,7 +855,7 @@ machine_at_p5mms98_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p5mms98/s981182.rom", + ret = bios_load_linear(L"roms/machines/socket7/p5mms98/s981182.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -920,7 +920,7 @@ machine_at_ficva502_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ficva502/VA502bp.BIN", + ret = bios_load_linear(L"roms/machines/socket7/ficva502/VA502bp.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -949,7 +949,7 @@ machine_at_ficpa2012_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ficpa2012/113jb16.awd", + ret = bios_load_linear(L"roms/machines/socket7/ficpa2012/113jb16.awd", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -979,7 +979,7 @@ machine_at_advanceii_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/advanceii/VP3_V27.BIN", + ret = bios_load_linear(L"roms/machines/socket7/advanceii/VP3_V27.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_socket8.c b/src/machine/m_at_socket8.c index fd7b5bcea..19b99927f 100644 --- a/src/machine/m_at_socket8.c +++ b/src/machine/m_at_socket8.c @@ -46,7 +46,7 @@ machine_at_686nx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/686nx/6nx.140", + ret = bios_load_linear(L"roms/machines/socket8/686nx/6nx.140", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -76,7 +76,7 @@ machine_at_mb600n_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/mb600n/60915cs.rom", + ret = bios_load_linear(L"roms/machines/socket8/mb600n/60915cs.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -105,7 +105,7 @@ machine_at_8500ttc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/8500ttc/TTC0715B.ROM", + ret = bios_load_linear(L"roms/machines/socket8/8500ttc/TTC0715B.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -134,7 +134,7 @@ machine_at_m6mi_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/m6mi/M6MI05.ROM", + ret = bios_load_linear(L"roms/machines/socket8/m6mi/M6MI05.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_super7_ss7.c b/src/machine/m_at_super7_ss7.c index bc876a206..c53123a99 100644 --- a/src/machine/m_at_super7_ss7.c +++ b/src/machine/m_at_super7_ss7.c @@ -50,7 +50,7 @@ machine_at_ax59pro_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ax59pro/AX59P236.BIN", + ret = bios_load_linear(L"roms/machines/super7/ax59pro/AX59P236.BIN", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -82,7 +82,7 @@ machine_at_mvp3_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ficva503p/je4333.bin", + ret = bios_load_linear(L"roms/machines/super7/ficva503p/je4333.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_europc.c b/src/machine/m_europc.c index 1ce423ee7..d5eb0ffee 100644 --- a/src/machine/m_europc.c +++ b/src/machine/m_europc.c @@ -710,7 +710,7 @@ machine_europc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/europc/50145", + ret = bios_load_linear(L"roms/machines/xt/europc/50145", 0x000f8000, 32768, 0); if (bios_only || !ret) diff --git a/src/machine/m_ps1.c b/src/machine/m_ps1.c index 9295b5b7b..14efd9365 100644 --- a/src/machine/m_ps1.c +++ b/src/machine/m_ps1.c @@ -452,7 +452,7 @@ ps1_setup(int model) if (model == 2011) { rom_init(&ps->high_rom, - L"roms/machines/ibmps1es/f80000.bin", + L"roms/machines/ps1/ibmps1es/f80000.bin", 0xf80000, 0x80000, 0x7ffff, 0, MEM_MAPPING_EXTERNAL); lpt2_remove(); @@ -475,7 +475,7 @@ ps1_setup(int model) #if 0 rom_init(&ps->high_rom, - L"roms/machines/ibmps1_2121/fc0000.bin", + L"roms/machines/ps1/ibmps1_2121/fc0000.bin", 0xfc0000, 0x20000, 0x1ffff, 0, MEM_MAPPING_EXTERNAL); #endif @@ -533,7 +533,7 @@ machine_ps1_m2011_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ibmps1es/f80000.bin", + ret = bios_load_linear(L"roms/machines/ps1/ibmps1es/f80000.bin", 0x000e0000, 131072, 0x60000); if (bios_only || !ret) @@ -552,7 +552,7 @@ machine_ps1_m2121_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ibmps1_2121/fc0000.bin", + ret = bios_load_linear(L"roms/machines/ps1/ibmps1_2121/fc0000.bin", 0x000e0000, 131072, 0x20000); if (bios_only || !ret) @@ -572,7 +572,7 @@ machine_ps1_m2133_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ibmps1_2133/ps1_2133_52g2974_rom.bin", + ret = bios_load_linear(L"roms/machines/ps1/ibmps1_2133/ps1_2133_52g2974_rom.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_ps2_isa.c b/src/machine/m_ps2_isa.c index 9300d05d4..a66578c8c 100644 --- a/src/machine/m_ps2_isa.c +++ b/src/machine/m_ps2_isa.c @@ -166,7 +166,7 @@ machine_ps2_m30_286_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/ibmps2_m30_286/33f5381a.bin", + ret = bios_load_linear(L"roms/machines/ps2/ibmps2_m30_286/33f5381a.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_ps2_mca.c b/src/machine/m_ps2_mca.c index 5a1bf3fd5..85295b983 100644 --- a/src/machine/m_ps2_mca.c +++ b/src/machine/m_ps2_mca.c @@ -1269,11 +1269,11 @@ machine_ps2_model_50_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmps2_m50/90x7420.zm13", - L"roms/machines/ibmps2_m50/90x7429.zm18", + ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m50/90x7420.zm13", + L"roms/machines/ps2/ibmps2_m50/90x7429.zm18", 0x000f0000, 131072, 0); - ret &= bios_load_aux_interleaved(L"roms/machines/ibmps2_m50/90x7423.zm14", - L"roms/machines/ibmps2_m50/90x7426.zm16", + ret &= bios_load_aux_interleaved(L"roms/machines/ps2/ibmps2_m50/90x7423.zm14", + L"roms/machines/ps2/ibmps2_m50/90x7426.zm16", 0x000e0000, 65536, 0); if (bios_only || !ret) @@ -1292,8 +1292,8 @@ machine_ps2_model_55sx_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmps2_m55sx/33f8146.zm41", - L"roms/machines/ibmps2_m55sx/33f8145.zm40", + ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m55sx/33f8146.zm41", + L"roms/machines/ps2/ibmps2_m55sx/33f8145.zm40", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1312,8 +1312,8 @@ machine_ps2_model_70_type3_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmps2_m70_type3/70-a_even.bin", - L"roms/machines/ibmps2_m70_type3/70-a_odd.bin", + ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m70_type3/70-a_even.bin", + L"roms/machines/ps2/ibmps2_m70_type3/70-a_odd.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1333,8 +1333,8 @@ machine_ps2_model_70_type4_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmps2_m70_type4/70-b_even.bin", - L"roms/machines/ibmps2_m70_type4/70-b_odd.bin", + ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m70_type4/70-b_even.bin", + L"roms/machines/ps2/ibmps2_m70_type4/70-b_odd.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1354,8 +1354,8 @@ machine_ps2_model_80_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ibmps2_m80/15f6637.bin", - L"roms/machines/ibmps2_m80/15f6639.bin", + ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m80/15f6637.bin", + L"roms/machines/ps2/ibmps2_m80/15f6639.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index 3fee77bba..d39f52276 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -1446,8 +1446,8 @@ init_rom(tandy_t *dev) dev->rom = (uint8_t *)malloc(0x80000); #if 1 - if (! rom_load_interleaved(L"roms/machines/tandy1000sl2/8079047.hu1", - L"roms/machines/tandy1000sl2/8079048.hu2", + if (! rom_load_interleaved(L"roms/machines/tandy/tandy1000sl2/8079047.hu1", + L"roms/machines/tandy/tandy1000sl2/8079048.hu2", 0x000000, 0x80000, 0, dev->rom)) { tandy_log("TANDY: unable to load BIOS for 1000/SL2 !\n"); free(dev->rom); @@ -1455,8 +1455,8 @@ init_rom(tandy_t *dev) return; } #else - f = rom_fopen(L"roms/machines/tandy1000sl2/8079047.hu1", L"rb"); - ff = rom_fopen(L"roms/machines/tandy1000sl2/8079048.hu2", L"rb"); + f = rom_fopen(L"roms/machines/tandy/tandy1000sl2/8079047.hu1", L"rb"); + ff = rom_fopen(L"roms/machines/tandy/tandy1000sl2/8079048.hu2", L"rb"); for (c = 0x0000; c < 0x80000; c += 2) { dev->rom[c] = getc(f); dev->rom[c + 1] = getc(ff); @@ -1545,7 +1545,7 @@ machine_tandy_init(const machine_t *model) { int ret; - ret = bios_load_linearr(L"roms/machines/tandy/tandy1t1.020", + ret = bios_load_linearr(L"roms/machines/tandy/tandy/tandy1t1.020", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -1562,7 +1562,7 @@ machine_tandy1000hx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/tandy1000hx/v020000.u12", + ret = bios_load_linear(L"roms/machines/tandy/tandy1000hx/v020000.u12", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1579,8 +1579,8 @@ machine_tandy1000sl2_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/tandy1000sl2/8079047.hu1", - L"roms/machines/tandy1000sl2/8079048.hu2", + ret = bios_load_interleaved(L"roms/machines/tandy/tandy1000sl2/8079047.hu1", + L"roms/machines/tandy/tandy1000sl2/8079048.hu2", 0x000f0000, 65536, 0x18000); if (bios_only || !ret) diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index 0cbf071d1..6d1dd97ab 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -36,16 +36,16 @@ machine_pc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ibmpc/BIOS_5150_24APR81_U33.BIN", + ret = bios_load_linear(L"roms/machines/xt/ibmpc/BIOS_5150_24APR81_U33.BIN", 0x000fe000, 40960, 0); if (ret) { - bios_load_aux_linear(L"roms/machines/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U29 - 5700019.bin", + bios_load_aux_linear(L"roms/machines/xt/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U29 - 5700019.bin", 0x000f6000, 8192, 0); - bios_load_aux_linear(L"roms/machines/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U30 - 5700027.bin", + bios_load_aux_linear(L"roms/machines/xt/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U30 - 5700027.bin", 0x000f8000, 8192, 0); - bios_load_aux_linear(L"roms/machines/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U31 - 5700035.bin", + bios_load_aux_linear(L"roms/machines/xt/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U31 - 5700035.bin", 0x000fa000, 8192, 0); - bios_load_aux_linear(L"roms/machines/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U32 - 5700043.bin", + bios_load_aux_linear(L"roms/machines/xt/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U32 - 5700043.bin", 0x000fc000, 8192, 0); } @@ -65,19 +65,19 @@ machine_pc82_init(const machine_t *model) { int ret, ret2; - ret = bios_load_linear(L"roms/machines/ibmpc82/pc102782.bin", + ret = bios_load_linear(L"roms/machines/xt/ibmpc82/pc102782.bin", 0x000fe000, 40960, 0); if (ret) { - ret2 = bios_load_aux_linear(L"roms/machines/ibmpc82/ibm-basic-1.10.rom", + ret2 = bios_load_aux_linear(L"roms/machines/xt/ibmpc82/ibm-basic-1.10.rom", 0x000f6000, 32768, 0); if (!ret2) { - bios_load_aux_linear(L"roms/machines/ibmpc82/basicc11.f6", + bios_load_aux_linear(L"roms/machines/xt/ibmpc82/basicc11.f6", 0x000f6000, 8192, 0); - bios_load_aux_linear(L"roms/machines/ibmpc82/basicc11.f8", + bios_load_aux_linear(L"roms/machines/xt/ibmpc82/basicc11.f8", 0x000f8000, 8192, 0); - bios_load_aux_linear(L"roms/machines/ibmpc82/basicc11.fa", + bios_load_aux_linear(L"roms/machines/xt/ibmpc82/basicc11.fa", 0x000fa000, 8192, 0); - bios_load_aux_linear(L"roms/machines/ibmpc82/basicc11.fc", + bios_load_aux_linear(L"roms/machines/xt/ibmpc82/basicc11.fc", 0x000fc000, 8192, 0); } } @@ -108,15 +108,15 @@ machine_xt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ibmxt/xt.rom", + ret = bios_load_linear(L"roms/machines/xt/ibmxt/xt.rom", 0x000f0000, 65536, 0); if (!ret) { - ret = bios_load_linear(L"roms/machines/ibmxt/1501512.u18", + ret = bios_load_linear(L"roms/machines/xt/ibmxt/1501512.u18", 0x000fe000, 65536, 0x6000); if (ret) { - bios_load_aux_linear(L"roms/machines/ibmxt/1501512.u18", + bios_load_aux_linear(L"roms/machines/xt/ibmxt/1501512.u18", 0x000f8000, 24576, 0); - bios_load_aux_linear(L"roms/machines/ibmxt/5000027.u19", + bios_load_aux_linear(L"roms/machines/xt/ibmxt/5000027.u19", 0x000f0000, 32768, 0); } } @@ -137,7 +137,7 @@ machine_genxt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/genxt/pcxt.rom", + ret = bios_load_linear(L"roms/machines/xt/genxt/pcxt.rom", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -154,12 +154,12 @@ machine_xt86_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", + ret = bios_load_linear(L"roms/machines/xt/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", 0x000fe000, 65536, 0x6000); if (ret) { - (void) bios_load_aux_linear(L"roms/machines/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", + (void) bios_load_aux_linear(L"roms/machines/xt/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", 0x000f8000, 24576, 0); - (void) bios_load_aux_linear(L"roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", + (void) bios_load_aux_linear(L"roms/machines/xt/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", 0x000f0000, 32768, 0); } @@ -189,7 +189,7 @@ machine_xt_amixt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/amixt/ami_8088_bios_31jan89.bin", + ret = bios_load_linear(L"roms/machines/xt/amixt/ami_8088_bios_31jan89.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -206,7 +206,7 @@ machine_xt_dtk_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/dtk/dtk_erso_2.42_2764.bin", + ret = bios_load_linear(L"roms/machines/xt/dtk/dtk_erso_2.42_2764.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -223,7 +223,7 @@ machine_xt_jukopc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/jukopc/000o001.bin", + ret = bios_load_linear(L"roms/machines/xt/jukopc/000o001.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -240,7 +240,7 @@ machine_xt_open_xt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/open_xt/pcxt31.bin", + ret = bios_load_linear(L"roms/machines/xt/open_xt/pcxt31.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -256,7 +256,7 @@ machine_xt_hed919_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/hed919/Hedaka_HED-919_bios_version_3.28f.bin", + ret = bios_load_linear(L"roms/machines/xt/hed919/Hedaka_HED-919_bios_version_3.28f.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -272,7 +272,7 @@ machine_xt_pxxt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/pxxt/000p001.bin", + ret = bios_load_linear(L"roms/machines/xt/pxxt/000p001.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) diff --git a/src/machine/m_xt_compaq.c b/src/machine/m_xt_compaq.c index 575500ffb..d91be442b 100644 --- a/src/machine/m_xt_compaq.c +++ b/src/machine/m_xt_compaq.c @@ -42,7 +42,7 @@ machine_xt_compaq_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/portable/compaq portable plus 100666-001 rev c u47.bin", + ret = bios_load_linear(L"roms/machines/compaq/portable/compaq portable plus 100666-001 rev c u47.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) diff --git a/src/machine/m_xt_laserxt.c b/src/machine/m_xt_laserxt.c index d0b0fdf81..771e1f1db 100644 --- a/src/machine/m_xt_laserxt.c +++ b/src/machine/m_xt_laserxt.c @@ -139,7 +139,7 @@ machine_xt_laserxt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ltxt/27c64.bin", + ret = bios_load_linear(L"roms/machines/xt/ltxt/27c64.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -158,7 +158,7 @@ machine_xt_lxt3_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/lxt3/27c64d.bin", + ret = bios_load_linear(L"roms/machines/xt/lxt3/27c64d.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) diff --git a/src/machine/m_xt_t1000.c b/src/machine/m_xt_t1000.c index bf31be9f7..a0881c30e 100644 --- a/src/machine/m_xt_t1000.c +++ b/src/machine/m_xt_t1000.c @@ -858,7 +858,7 @@ machine_xt_t1000_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/t1000/t1000.rom", + ret = bios_load_linear(L"roms/machines/t1000/t1000/t1000.rom", 0x000f8000, 32768, 0); if (bios_only || !ret) @@ -870,7 +870,7 @@ machine_xt_t1000_init(const machine_t *model) t1000.ems_port_index = 7; /* EMS disabled */ /* Load the T1000 CGA Font ROM. */ - loadfont(L"roms/machines/t1000/t1000font.rom", 2); + loadfont(L"roms/machines/t1000/t1000/t1000font.rom", 2); /* * The ROM drive is optional. @@ -878,7 +878,7 @@ machine_xt_t1000_init(const machine_t *model) * If the file is missing, continue to boot; the BIOS will * complain 'No ROM drive' but boot normally from floppy. */ - f = rom_fopen(L"roms/machines/t1000/t1000dos.rom", L"rb"); + f = rom_fopen(L"roms/machines/t1000/t1000/t1000dos.rom", L"rb"); if (f != NULL) { t1000.romdrive = malloc(T1000_ROMSIZE); if (t1000.romdrive) { @@ -951,7 +951,7 @@ machine_xt_t1200_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/t1200/t1200_019e.ic15.bin", + ret = bios_load_linear(L"roms/machines/t1000/t1200/t1200_019e.ic15.bin", 0x000f8000, 32768, 0); if (bios_only || !ret) @@ -962,7 +962,7 @@ machine_xt_t1200_init(const machine_t *model) t1000.ems_port_index = 7; /* EMS disabled */ /* Load the T1200 CGA Font ROM. */ - loadfont(L"roms/machines/t1200/t1000font.bin", 2); + loadfont(L"roms/machines/t1000/t1200/t1000font.bin", 2); /* Map the EMS page frame */ for (pg = 0; pg < 4; pg++) { diff --git a/src/machine/m_xt_xi8088.c b/src/machine/m_xt_xi8088.c index 875a2ba11..0fde7f97d 100644 --- a/src/machine/m_xt_xi8088.c +++ b/src/machine/m_xt_xi8088.c @@ -151,18 +151,18 @@ machine_xt_xi8088_init(const machine_t *model) int ret; if (bios_only) { - ret = bios_load_linear_inverted(L"roms/machines/xi8088/bios-xi8088-128k.bin", + ret = bios_load_linear_inverted(L"roms/machines/xt/xi8088/bios-xi8088-128k.bin", 0x000e0000, 131072, 0); - ret |= bios_load_linear(L"roms/machines/xi8088/bios-xi8088.bin", + ret |= bios_load_linear(L"roms/machines/xt/xi8088/bios-xi8088.bin", 0x000f0000, 65536, 0); } else { device_add(&xi8088_device); if (xi8088_bios_128kb()) { - ret = bios_load_linear_inverted(L"roms/machines/xi8088/bios-xi8088-128k.bin", + ret = bios_load_linear_inverted(L"roms/machines/xt/xi8088/bios-xi8088-128k.bin", 0x000e0000, 131072, 0); } else { - ret = bios_load_linear(L"roms/machines/xi8088/bios-xi8088.bin", + ret = bios_load_linear(L"roms/machines/xt/xi8088/bios-xi8088.bin", 0x000f0000, 65536, 0); } } diff --git a/src/machine/m_xt_zenith.c b/src/machine/m_xt_zenith.c index 0d527d20b..917fc9080 100644 --- a/src/machine/m_xt_zenith.c +++ b/src/machine/m_xt_zenith.c @@ -109,7 +109,7 @@ machine_xt_zenith_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/zdsupers/z184m v3.1d.10d", + ret = bios_load_linear(L"roms/machines/xt/zdsupers/z184m v3.1d.10d", 0x000f8000, 32768, 0); if (bios_only || !ret) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 255f893e7..d03ca41a2 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -206,6 +206,7 @@ const machine_t machines[] = { { "[486 PCI] Zida Tomato 4DP", "4dps", {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 255, 1, 127, machine_at_4dps_init, NULL }, /* Socket 4 machines */ + /* 430LX */ { "[Socket 4 LX] IBM Ambra DP60 PCI", "ambradp60", {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 2, 128, 2, 127, machine_at_ambradp60_init, NULL }, #if defined(DEV_BRANCH) && defined(USE_VPP60) From 5fcc4602f296c539d830b96f43dadafe0d5d3b4d Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 22 May 2020 15:59:59 -0300 Subject: [PATCH 07/35] Work around the P3B-F's expected VCORE for Cyrix III --- src/machine/m_at_slot1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index d9ad75310..ffac89374 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -229,6 +229,8 @@ machine_at_p3bf_init(const machine_t *model) }; if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_PENTIUM2) machine_hwm.voltages[0] = 2800; /* set higher VCORE (2.8V) for Klamath */ + else if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_CYRIX3S) + machine_hwm.voltages[0] = 2800; /* P3B-F specific issue: it believes the Cyrix III is a Klamath, and therefore expects a toasty 2.8V */ hwm_set_values(machine_hwm); device_add(&as99127f_device); From f6fd4eec1a64c6c0ba15d50846fedc1198751d01 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Fri, 22 May 2020 16:00:23 -0300 Subject: [PATCH 08/35] Fix secondary temperature readouts on AS99127F machines --- src/hwm_lm75.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hwm_lm75.c b/src/hwm_lm75.c index 8463fbc78..097b62e8e 100644 --- a/src/hwm_lm75.c +++ b/src/hwm_lm75.c @@ -128,7 +128,7 @@ lm75_read(lm75_t *dev, uint8_t reg) /* The AS99127F hardware monitor uses the addresses of its LM75 devices to access some of its proprietary registers. Pass this operation on to the main monitor address through an internal SMBus call, if necessary. */ - if (((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr)) + if ((reg > 0x7) && ((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr)) ret = smbus_read_byte_cmd(dev->as99127f_smbus_addr, reg); else ret = dev->regs[reg & 0x7]; @@ -191,7 +191,7 @@ lm75_write(lm75_t *dev, uint8_t reg, uint8_t val) /* The AS99127F hardware monitor uses the addresses of its LM75 devices to access some of its proprietary registers. Pass this operation on to the main monitor address through an internal SMBus call, if necessary. */ - if (((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr)) { + if ((reg > 0x7) && ((reg & 0xf8) != 0x50) && (dev->as99127f_smbus_addr)) { smbus_write_byte_cmd(dev->as99127f_smbus_addr, reg, val); return 1; } From dfa28eb8e951d8f8ceab44ca1bc5ee8f6fdbfa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= Date: Fri, 22 May 2020 22:32:46 +0200 Subject: [PATCH 09/35] Revert "Machine path reorganisation" This reverts commit 0a48dbcfcdde6eb5117323d509407049aad89968. --- src/machine/m_amstrad.c | 42 +++++++++--------- src/machine/m_at.c | 24 +++++----- src/machine/m_at_286_386sx.c | 54 +++++++++++------------ src/machine/m_at_386dx_486.c | 38 ++++++++-------- src/machine/m_at_commodore.c | 4 +- src/machine/m_at_compaq.c | 12 ++--- src/machine/m_at_slot1.c | 14 +++--- src/machine/m_at_slot2.c | 2 +- src/machine/m_at_socket370.c | 10 ++--- src/machine/m_at_socket4_5.c | 41 +++++++++--------- src/machine/m_at_socket7_s7.c | 82 +++++++++++++++++------------------ src/machine/m_at_socket8.c | 8 ++-- src/machine/m_at_super7_ss7.c | 4 +- src/machine/m_europc.c | 2 +- src/machine/m_ps1.c | 10 ++--- src/machine/m_ps2_isa.c | 2 +- src/machine/m_ps2_mca.c | 24 +++++----- src/machine/m_tandy.c | 16 +++---- src/machine/m_xt.c | 50 ++++++++++----------- src/machine/m_xt_compaq.c | 2 +- src/machine/m_xt_laserxt.c | 4 +- src/machine/m_xt_t1000.c | 10 ++--- src/machine/m_xt_xi8088.c | 8 ++-- src/machine/m_xt_zenith.c | 2 +- src/machine/machine_table.c | 1 - 25 files changed, 233 insertions(+), 233 deletions(-) diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index 76fcf83f4..46cf9a215 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -844,7 +844,7 @@ vid_init_1640(amstrad_t *ams) vid = (amsvid_t *)malloc(sizeof(amsvid_t)); memset(vid, 0x00, sizeof(amsvid_t)); - rom_init(&vid->bios_rom, L"roms/machines/amstrad/pc1640/40100", + rom_init(&vid->bios_rom, L"roms/machines/pc1640/40100", 0xc0000, 0x8000, 0x7fff, 0, 0); ega_init(&vid->ega, 9, 0); @@ -2435,7 +2435,7 @@ machine_amstrad_init(const machine_t *model, int type) if (gfxcard == VID_INTERNAL) switch(type) { case AMS_PC1512: - loadfont(L"roms/machines/amstrad/pc1512/40078", 8); + loadfont(L"roms/machines/pc1512/40078", 8); device_context(&vid_1512_device); ams->language = device_get_config_int("language"); vid_init_1512(ams); @@ -2444,7 +2444,7 @@ machine_amstrad_init(const machine_t *model, int type) break; case AMS_PPC512: - loadfont(L"roms/machines/amstrad/ppc512/40109", 1); + loadfont(L"roms/machines/ppc512/40109", 1); device_context(&vid_ppc512_device); ams->language = device_get_config_int("language"); vid_init_200(ams); @@ -2462,7 +2462,7 @@ machine_amstrad_init(const machine_t *model, int type) break; case AMS_PC200: - loadfont(L"roms/machines/amstrad/pc200/40109", 1); + loadfont(L"roms/machines/pc200/40109", 1); device_context(&vid_200_device); ams->language = device_get_config_int("language"); vid_init_200(ams); @@ -2517,10 +2517,10 @@ machine_pc1512_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/amstrad/pc1512/40044", - L"roms/machines/amstrad/pc1512/40043", + ret = bios_load_interleaved(L"roms/machines/pc1512/40044", + L"roms/machines/pc1512/40043", 0x000fc000, 16384, 0); - ret &= rom_present(L"roms/machines/amstrad/pc1512/40078"); + ret &= rom_present(L"roms/machines/pc1512/40078"); if (bios_only || !ret) return ret; @@ -2536,10 +2536,10 @@ machine_pc1640_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/amstrad/pc1640/40044.v3", - L"roms/machines/amstrad/pc1640/40043.v3", + ret = bios_load_interleaved(L"roms/machines/pc1640/40044.v3", + L"roms/machines/pc1640/40043.v3", 0x000fc000, 16384, 0); - ret &= rom_present(L"roms/machines/amstrad/pc1640/40100"); + ret &= rom_present(L"roms/machines/pc1640/40100"); if (bios_only || !ret) return ret; @@ -2555,10 +2555,10 @@ machine_pc200_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/amstrad/pc200/pc20v2.1", - L"roms/machines/amstrad/pc200/pc20v2.0", + ret = bios_load_interleaved(L"roms/machines/pc200/pc20v2.1", + L"roms/machines/pc200/pc20v2.0", 0x000fc000, 16384, 0); - ret &= rom_present(L"roms/machines/amstrad/pc200/40109"); + ret &= rom_present(L"roms/machines/pc200/40109"); if (bios_only || !ret) return ret; @@ -2574,10 +2574,10 @@ machine_ppc512_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/amstrad/ppc512/40107.v2", - L"roms/machines/amstrad/ppc512/40108.v2", + ret = bios_load_interleaved(L"roms/machines/ppc512/40107.v2", + L"roms/machines/ppc512/40108.v2", 0x000fc000, 16384, 0); - ret &= rom_present(L"roms/machines/amstrad/ppc512/40109"); + ret &= rom_present(L"roms/machines/ppc512/40109"); if (bios_only || !ret) return ret; @@ -2593,10 +2593,10 @@ machine_pc2086_init(const machine_t *model) { int ret; - ret = bios_load_interleavedr(L"roms/machines/amstrad/pc2086/40179.ic129", - L"roms/machines/amstrad/pc2086/40180.ic132", + ret = bios_load_interleavedr(L"roms/machines/pc2086/40179.ic129", + L"roms/machines/pc2086/40180.ic132", 0x000fc000, 65536, 0); - ret &= rom_present(L"roms/machines/amstrad/pc2086/40186.ic171"); + ret &= rom_present(L"roms/machines/pc2086/40186.ic171"); if (bios_only || !ret) return ret; @@ -2612,9 +2612,9 @@ machine_pc3086_init(const machine_t *model) { int ret; - ret = bios_load_linearr(L"roms/machines/amstrad/pc3086/fc00.bin", + ret = bios_load_linearr(L"roms/machines/pc3086/fc00.bin", 0x000fc000, 65536, 0); - ret &= rom_present(L"roms/machines/amstrad/pc3086/c000.bin"); + ret &= rom_present(L"roms/machines/pc3086/c000.bin"); if (bios_only || !ret) return ret; diff --git a/src/machine/m_at.c b/src/machine/m_at.c index 58d021086..90f4fc40c 100644 --- a/src/machine/m_at.c +++ b/src/machine/m_at.c @@ -156,8 +156,8 @@ machine_at_ibm_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/at/ibmat/62x0820.u27", - L"roms/machines/at/ibmat/62x0821.u47", + ret = bios_load_interleaved(L"roms/machines/ibmat/62x0820.u27", + L"roms/machines/ibmat/62x0821.u47", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -174,8 +174,8 @@ machine_at_ibmatquadtel_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/at/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", - L"roms/machines/at/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", + ret = bios_load_interleaved(L"roms/machines/ibmatquadtel/BIOS_30MAR90_U27_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", + L"roms/machines/ibmatquadtel/BIOS_30MAR90_U47_QUADTEL_ENH_286_BIOS_3.05.01_27256.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -191,8 +191,8 @@ machine_at_ibmatami_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/at/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", - L"roms/machines/at/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", + ret = bios_load_interleaved(L"roms/machines/ibmatami/BIOS_5170_30APR89_U27_AMI_27256.BIN", + L"roms/machines/ibmatami/BIOS_5170_30APR89_U47_AMI_27256.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -208,8 +208,8 @@ machine_at_ibmatpx_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/at/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin", - L"roms/machines/at/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin", + ret = bios_load_interleaved(L"roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Even.bin", + L"roms/machines/ibmatpx/BIOS ROM - PhoenixBIOS A286 - Version 1.01 - Odd.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -225,8 +225,8 @@ machine_at_ibmxt286_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/at/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin", - L"roms/machines/at/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin", + ret = bios_load_interleaved(L"roms/machines/ibmxt286/bios_5162_21apr86_u34_78x7460_27256.bin", + L"roms/machines/ibmxt286/bios_5162_21apr86_u35_78x7461_27256.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -243,7 +243,7 @@ machine_at_siemens_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/at/siemens/286BIOS.BIN", + ret = bios_load_linear(L"roms/machines/siemens/286BIOS.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -261,7 +261,7 @@ machine_at_open_at_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/at/open_at/bios.bin", + ret = bios_load_linear(L"roms/machines/open_at/bios.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_286_386sx.c b/src/machine/m_at_286_386sx.c index 78b6c3df9..ddc349033 100644 --- a/src/machine/m_at_286_386sx.c +++ b/src/machine/m_at_286_386sx.c @@ -43,8 +43,8 @@ machine_at_mr286_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/286_386sx/mr286/V000B200-1", - L"roms/machines/286_386sx/mr286/V000B200-2", + ret = bios_load_interleaved(L"roms/machines/mr286/V000B200-1", + L"roms/machines/mr286/V000B200-2", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -77,7 +77,7 @@ machine_at_headland_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/ami386/ami386.bin", + ret = bios_load_linear(L"roms/machines/ami386/ami386.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -97,7 +97,7 @@ machine_at_tg286m_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/tg286m/ami.bin", + ret = bios_load_linear(L"roms/machines/tg286m/ami.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -123,7 +123,7 @@ machine_at_ama932j_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/ama932j/ami.bin", + ret = bios_load_linear(L"roms/machines/ama932j/ami.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -144,8 +144,8 @@ machine_at_quadt286_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/286_386sx/quadt286/QUADT89L.ROM", - L"roms/machines/286_386sx/quadt286/QUADT89H.ROM", + ret = bios_load_interleaved(L"roms/machines/quadt286/QUADT89L.ROM", + L"roms/machines/quadt286/QUADT89H.ROM", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -164,7 +164,7 @@ machine_at_neat_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/dtk386/3cto001.bin", + ret = bios_load_linear(L"roms/machines/dtk386/3cto001.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -184,7 +184,7 @@ machine_at_neat_ami_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/ami286/amic206.bin", + ret = bios_load_linear(L"roms/machines/ami286/amic206.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -205,7 +205,7 @@ machine_at_px286_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/px286/KENITEC.BIN", + ret = bios_load_linear(L"roms/machines/px286/KENITEC.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -225,8 +225,8 @@ machine_at_goldstar386_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/286_386sx/goldstar386/386-Goldstar-E.BIN", - L"roms/machines/286_386sx/goldstar386/386-Goldstar-O.BIN", + ret = bios_load_interleaved(L"roms/machines/goldstar386/386-Goldstar-E.BIN", + L"roms/machines/goldstar386/386-Goldstar-O.BIN", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -245,8 +245,8 @@ machine_at_micronics386_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/286_386sx/micronics386/386-Micronics-09-00021-EVEN.BIN", - L"roms/machines/286_386sx/micronics386/386-Micronics-09-00021-ODD.BIN", + ret = bios_load_interleaved(L"roms/machines/micronics386/386-Micronics-09-00021-EVEN.BIN", + L"roms/machines/micronics386/386-Micronics-09-00021-ODD.BIN", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -290,7 +290,7 @@ machine_at_award286_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/award286/award.bin", + ret = bios_load_linear(L"roms/machines/award286/award.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -306,7 +306,7 @@ machine_at_gdc212m_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/gdc212m/gdc212m_72h.bin", + ret = bios_load_linear(L"roms/machines/gdc212m/gdc212m_72h.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -322,7 +322,7 @@ machine_at_gw286ct_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/gw286ct/2ctc001.bin", + ret = bios_load_linear(L"roms/machines/gw286ct/2ctc001.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -341,7 +341,7 @@ machine_at_super286tr_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/super286tr/hyundai_award286.bin", + ret = bios_load_linear(L"roms/machines/super286tr/hyundai_award286.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -358,7 +358,7 @@ machine_at_spc4200p_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/spc4200p/u8.01", + ret = bios_load_linear(L"roms/machines/spc4200p/u8.01", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -375,8 +375,8 @@ machine_at_spc4216p_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/286_386sx/spc4216p/7101.u8", - L"roms/machines/286_386sx/spc4216p/ac64.u10", + ret = bios_load_interleaved(L"roms/machines/spc4216p/7101.u8", + L"roms/machines/spc4216p/ac64.u10", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -393,7 +393,7 @@ machine_at_kmxc02_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/kmxc02/3ctm005.bin", + ret = bios_load_linear(L"roms/machines/kmxc02/3ctm005.bin", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -409,7 +409,7 @@ machine_at_deskmaster286_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/286_386sx/deskmaster286/SAMSUNG-DESKMASTER-28612-ROM.BIN", + ret = bios_load_linear(L"roms/machines/deskmaster286/SAMSUNG-DESKMASTER-28612-ROM.BIN", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -425,8 +425,8 @@ machine_at_wd76c10_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/286_386sx/megapc/41651-bios lo.u18", - L"roms/machines/286_386sx/megapc/211253-bios hi.u19", + ret = bios_load_interleaved(L"roms/machines/megapc/41651-bios lo.u18", + L"roms/machines/megapc/211253-bios hi.u19", 0x000f0000, 65536, 0x08000); if (bios_only || !ret) @@ -455,8 +455,8 @@ machine_at_commodore_sl386sx_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/286_386sx/cbm_sl386sx25/cbm-sl386sx-bios-lo-v1.04-390914-04.bin", - L"roms/machines/286_386sx/cbm_sl386sx25/cbm-sl386sx-bios-hi-v1.04-390915-04.bin", + ret = bios_load_interleaved(L"roms/machines/cbm_sl386sx25/cbm-sl386sx-bios-lo-v1.04-390914-04.bin", + L"roms/machines/cbm_sl386sx25/cbm-sl386sx-bios-hi-v1.04-390915-04.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 29221b51a..4bed55f9c 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -49,7 +49,7 @@ machine_at_acc386_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/acc386/acc386.BIN", + ret = bios_load_linear(L"roms/machines/acc386/acc386.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -68,8 +68,8 @@ machine_at_ecs386_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/386dx_486/ecs386/AMI BIOS for ECS-386_32 motherboard - L chip.bin", - L"roms/machines/386dx_486/ecs386/AMI BIOS for ECS-386_32 motherboard - H chip.bin", + ret = bios_load_interleaved(L"roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - L chip.bin", + L"roms/machines/ecs386/AMI BIOS for ECS-386_32 motherboard - H chip.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -88,7 +88,7 @@ machine_at_pb410a_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/pb410a/pb410a.080337.4abf.u25.bin", + ret = bios_load_linear(L"roms/machines/pb410a/pb410a.080337.4abf.u25.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -125,7 +125,7 @@ machine_at_ali1429_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/ami486/ami486.bin", + ret = bios_load_linear(L"roms/machines/ami486/ami486.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -142,7 +142,7 @@ machine_at_winbios1429_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/win486/ali1429g.amw", + ret = bios_load_linear(L"roms/machines/win486/ali1429g.amw", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -159,7 +159,7 @@ machine_at_opti495_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/award495/opt495s.awa", + ret = bios_load_linear(L"roms/machines/award495/opt495s.awa", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -193,7 +193,7 @@ machine_at_opti495_ami_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/ami495/opt495sx.ami", + ret = bios_load_linear(L"roms/machines/ami495/opt495sx.ami", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -210,7 +210,7 @@ machine_at_opti495_mr_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/mr495/opt495sx.mr", + ret = bios_load_linear(L"roms/machines/mr495/opt495sx.mr", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -237,7 +237,7 @@ machine_at_ami471_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/ami471/SIS471BE.AMI", + ret = bios_load_linear(L"roms/machines/ami471/SIS471BE.AMI", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -255,7 +255,7 @@ machine_at_dtk486_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/dtk486/4siw005.bin", + ret = bios_load_linear(L"roms/machines/dtk486/4siw005.bin", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -273,7 +273,7 @@ machine_at_px471_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/px471/SIS471A1.PHO", + ret = bios_load_linear(L"roms/machines/px471/SIS471A1.PHO", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -292,7 +292,7 @@ machine_at_win471_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/win471/486-SiS_AC0360136.BIN", + ret = bios_load_linear(L"roms/machines/win471/486-SiS_AC0360136.BIN", 0x000f0000, 65536, 0); if (bios_only || !ret) @@ -331,7 +331,7 @@ machine_at_r418_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/r418/r418i.bin", + ret = bios_load_linear(L"roms/machines/r418/r418i.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -354,7 +354,7 @@ machine_at_ls486e_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/ls486e/LS486E RevC.BIN", + ret = bios_load_linear(L"roms/machines/ls486e/LS486E RevC.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -378,7 +378,7 @@ machine_at_4dps_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/4dps/4DPS172G.BIN", + ret = bios_load_linear(L"roms/machines/4dps/4DPS172G.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -401,8 +401,8 @@ machine_at_alfredo_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/386dx_486/alfredo/1010AQ0_.BIO", - L"roms/machines/386dx_486/alfredo/1010AQ0_.BI1", 0x1c000, 128); + ret = bios_load_linear_combined(L"roms/machines/alfredo/1010AQ0_.BIO", + L"roms/machines/alfredo/1010AQ0_.BI1", 0x1c000, 128); if (bios_only || !ret) return ret; @@ -433,7 +433,7 @@ machine_at_486sp3g_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/386dx_486/486sp3g/PCI-I-486SP3G_0306.001 (Beta).bin", + ret = bios_load_linear(L"roms/machines/486sp3g/PCI-I-486SP3G_0306.001 (Beta).bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_commodore.c b/src/machine/m_at_commodore.c index 3aa0a2332..51f8e56b4 100644 --- a/src/machine/m_at_commodore.c +++ b/src/machine/m_at_commodore.c @@ -97,8 +97,8 @@ machine_at_cmdpc_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/commodore/cmdpc30/commodore pc 30 iii even.bin", - L"roms/machines/commodore/cmdpc30/commodore pc 30 iii odd.bin", + ret = bios_load_interleaved(L"roms/machines/cmdpc30/commodore pc 30 iii even.bin", + L"roms/machines/cmdpc30/commodore pc 30 iii odd.bin", 0x000f8000, 32768, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_compaq.c b/src/machine/m_at_compaq.c index e87167a9c..7cd3f254e 100644 --- a/src/machine/m_at_compaq.c +++ b/src/machine/m_at_compaq.c @@ -842,8 +842,8 @@ machine_at_portableii_init(const machine_t *model) { int ret; - ret = bios_load_interleavedr(L"roms/machines/compaq/portableii/109740-001.rom", - L"roms/machines/compaq/portableii/109739-001.rom", + ret = bios_load_interleavedr(L"roms/machines/portableii/109740-001.rom", + L"roms/machines/portableii/109739-001.rom", 0x000f8000, 65536, 0); if (bios_only || !ret) @@ -860,8 +860,8 @@ machine_at_portableiii_init(const machine_t *model) { int ret; - ret = bios_load_interleavedr(L"roms/machines/compaq/portableiii/Compaq Portable III - BIOS - 106779-002 - Even.bin", - L"roms/machines/compaq/portableiii/Compaq Portable III - BIOS - 106778-002 - Odd.bin", + ret = bios_load_interleavedr(L"roms/machines/portableiii/Compaq Portable III - BIOS - 106779-002 - Even.bin", + L"roms/machines/portableiii/Compaq Portable III - BIOS - 106778-002 - Odd.bin", 0x000f8000, 65536, 0); if (bios_only || !ret) @@ -878,8 +878,8 @@ machine_at_portableiii386_init(const machine_t *model) { int ret; - ret = bios_load_interleavedr(L"roms/machines/compaq/portableiii/Compaq Portable III - BIOS - 106779-002 - Even.bin", - L"roms/machines/compaq/portableiii/Compaq Portable III - BIOS - 106778-002 - Odd.bin", + ret = bios_load_interleavedr(L"roms/machines/portableiii/Compaq Portable III - BIOS - 106779-002 - Even.bin", + L"roms/machines/portableiii/Compaq Portable III - BIOS - 106778-002 - Odd.bin", 0x000f8000, 65536, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 0c193a678..ffac89374 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -63,7 +63,7 @@ machine_at_p6kfx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/slot1/p6kfx/kfxa22.bin", + ret = bios_load_linear(L"roms/machines/p6kfx/kfxa22.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -94,7 +94,7 @@ machine_at_6bxc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/slot1/6bxc/powleap.bin", + ret = bios_load_linear(L"roms/machines/6bxc/powleap.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -126,7 +126,7 @@ machine_at_p2bls_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/slot1/p2bls/1014ls.003", + ret = bios_load_linear(L"roms/machines/p2bls/1014ls.003", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -183,7 +183,7 @@ machine_at_p3bf_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/slot1/p3bf/bx3f1006.awd", + ret = bios_load_linear(L"roms/machines/p3bf/bx3f1006.awd", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -242,7 +242,7 @@ machine_at_bf6_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/slot1/bf6/Beh_70.bin", + ret = bios_load_linear(L"roms/machines/bf6/Beh_70.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -282,7 +282,7 @@ machine_at_p6sba_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/slot1/p6sba/SBAB21.ROM", + ret = bios_load_linear(L"roms/machines/p6sba/SBAB21.ROM", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -343,7 +343,7 @@ machine_at_tsunamiatx_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/slot1/tsunamiatx/bx46200f.rom", + ret = bios_load_linear(L"roms/machines/tsunamiatx/bx46200f.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_slot2.c b/src/machine/m_at_slot2.c index b1a095466..b85ce9a83 100644 --- a/src/machine/m_at_slot2.c +++ b/src/machine/m_at_slot2.c @@ -55,7 +55,7 @@ machine_at_s2dge_init(const machine_t *model) */ int ret; - ret = bios_load_linear(L"roms/machines/slot2/s2dge/2gu7301.rom", + ret = bios_load_linear(L"roms/machines/s2dge/2gu7301.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index d8a3e3345..8852ee804 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -47,7 +47,7 @@ machine_at_s370slm_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket370/s370slm/3LM1202.rom", + ret = bios_load_linear(L"roms/machines/s370slm/3LM1202.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -103,7 +103,7 @@ machine_at_cubx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket370/cubx/1008cu.004", + ret = bios_load_linear(L"roms/machines/cubx/1008cu.004", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -158,7 +158,7 @@ machine_at_atc7020bxii_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket370/atc7020bxii/7020s102.bin", + ret = bios_load_linear(L"roms/machines/atc7020bxii/7020s102.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -191,7 +191,7 @@ machine_at_63a_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket370/63a1/63a-q3.bin", + ret = bios_load_linear(L"roms/machines/63a1/63a-q3.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -224,7 +224,7 @@ machine_at_apas3_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket370/apas3/V0218SAG.BIN", + ret = bios_load_linear(L"roms/machines/apas3/V0218SAG.BIN", 0x000c0000, 262144, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_socket4_5.c b/src/machine/m_at_socket4_5.c index a9a421984..59e237567 100644 --- a/src/machine/m_at_socket4_5.c +++ b/src/machine/m_at_socket4_5.c @@ -42,6 +42,7 @@ #include <86box/video.h> #include <86box/machine.h> + static void machine_at_premiere_common_init(const machine_t *model) { @@ -89,8 +90,8 @@ machine_at_batman_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/socket4_5/revenge/1009af2_.bio", - L"roms/machines/socket4_5/revenge/1009af2_.bi1", 0x1c000, 128); + ret = bios_load_linear_combined(L"roms/machines/revenge/1009af2_.bio", + L"roms/machines/revenge/1009af2_.bi1", 0x1c000, 128); if (bios_only || !ret) return ret; @@ -108,8 +109,8 @@ machine_at_ambradp60_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/socket4_5/ambradp60/1004AF1P.BIO", - L"roms/machines/socket4_5/ambradp60/1004AF1P.BI1", 0x1c000, 128); + ret = bios_load_linear_combined(L"roms/machines/ambradp60/1004AF1P.BIO", + L"roms/machines/ambradp60/1004AF1P.BI1", 0x1c000, 128); if (bios_only || !ret) return ret; @@ -128,8 +129,8 @@ machine_at_valuepointp60_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/socket4_5/valuepointp60/1006AV0M.BIO", - L"roms/machines/socket4_5/valuepointp60/1006AV0M.BI1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/valuepointp60/1006AV0M.BIO", + L"roms/machines/valuepointp60/1006AV0M.BI1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -148,7 +149,7 @@ machine_at_586mc1_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket4_5/586mc1/IS.34", + ret = bios_load_linear(L"roms/machines/586mc1/IS.34", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -167,8 +168,8 @@ machine_at_plato_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/socket4_5/plato/1016ax1_.bio", - L"roms/machines/socket4_5/plato/1016ax1_.bi1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/plato/1016ax1_.bio", + L"roms/machines/plato/1016ax1_.bi1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -186,8 +187,8 @@ machine_at_ambradp90_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/socket4_5/ambradp90/1002AX1P.BIO", - L"roms/machines/socket4_5/ambradp90/1002AX1P.BI1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/ambradp90/1002AX1P.BIO", + L"roms/machines/ambradp90/1002AX1P.BI1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -205,7 +206,7 @@ machine_at_430nx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket4_5/430nx/IP.20", + ret = bios_load_linear(L"roms/machines/430nx/IP.20", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -224,7 +225,7 @@ machine_at_p54tp4xe_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket4_5/p54tp4xe/t15i0302.awd", + ret = bios_load_linear(L"roms/machines/p54tp4xe/t15i0302.awd", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -255,8 +256,8 @@ machine_at_endeavor_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/socket4_5/endeavor/1006cb0_.bio", - L"roms/machines/socket4_5/endeavor/1006cb0_.bi1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/endeavor/1006cb0_.bio", + L"roms/machines/endeavor/1006cb0_.bi1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -297,8 +298,8 @@ machine_at_zappa_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/socket4_5/zappa/1006bs0_.bio", - L"roms/machines/socket4_5/zappa/1006bs0_.bi1", 0x20000, 128); + ret = bios_load_linear_combined(L"roms/machines/zappa/1006bs0_.bio", + L"roms/machines/zappa/1006bs0_.bi1", 0x20000, 128); if (bios_only || !ret) return ret; @@ -326,7 +327,7 @@ machine_at_mb500n_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket4_5/mb500n/031396s.bin", + ret = bios_load_linear(L"roms/machines/mb500n/031396s.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -356,7 +357,7 @@ machine_at_vectra54_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket4_5/vectra54/GT0724.22", + ret = bios_load_linear(L"roms/machines/vectra54/GT0724.22", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -387,7 +388,7 @@ machine_at_powermate_v_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket4_5/powermate_v/BIOS.ROM", + ret = bios_load_linear(L"roms/machines/powermate_v/BIOS.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_socket7_s7.c b/src/machine/m_at_socket7_s7.c index ef4365f6a..de015103b 100644 --- a/src/machine/m_at_socket7_s7.c +++ b/src/machine/m_at_socket7_s7.c @@ -50,7 +50,7 @@ machine_at_chariot_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/chariot/P5IV183.ROM", + ret = bios_load_linear(L"roms/machines/chariot/P5IV183.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -80,7 +80,7 @@ machine_at_mr586_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/mr586/TRITON.BIO", + ret = bios_load_linear(L"roms/machines/mr586/TRITON.BIO", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -131,8 +131,8 @@ machine_at_thor_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/socket7/thor/1006cn0_.bio", - L"roms/machines/socket7/thor/1006cn0_.bi1", 0x20000, 128); + ret = bios_load_linear_combined(L"roms/machines/thor/1006cn0_.bio", + L"roms/machines/thor/1006cn0_.bi1", 0x20000, 128); if (bios_only || !ret) return ret; @@ -148,7 +148,7 @@ machine_at_mrthor_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/mrthor/mr_atx.bio", + ret = bios_load_linear(L"roms/machines/mrthor/mr_atx.bio", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -165,8 +165,8 @@ machine_at_pb640_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined(L"roms/machines/socket7/pb640/1007CP0R.BIO", - L"roms/machines/socket7/pb640/1007CP0R.BI1", 0x1d000, 128); + ret = bios_load_linear_combined(L"roms/machines/pb640/1007CP0R.BIO", + L"roms/machines/pb640/1007CP0R.BI1", 0x1d000, 128); if (bios_only || !ret) return ret; @@ -205,7 +205,7 @@ machine_at_acerm3a_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/acerm3a/r01-b3.bin", + ret = bios_load_linear(L"roms/machines/acerm3a/r01-b3.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -238,7 +238,7 @@ machine_at_acerv35n_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/acerv35n/v35nd1s1.bin", + ret = bios_load_linear(L"roms/machines/acerv35n/v35nd1s1.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -271,7 +271,7 @@ machine_at_ap53_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/ap53/ap53r2c0.rom", + ret = bios_load_linear(L"roms/machines/ap53/ap53r2c0.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -302,7 +302,7 @@ machine_at_p55t2p4_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/p55t2p4/0207_j2.bin", + ret = bios_load_linear(L"roms/machines/p55t2p4/0207_j2.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -332,7 +332,7 @@ machine_at_p55t2s_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/p55t2s/s6y08t.rom", + ret = bios_load_linear(L"roms/machines/p55t2s/s6y08t.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -361,7 +361,7 @@ machine_at_m7shi_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/m7shi/m7shi2n.rom", + ret = bios_load_linear(L"roms/machines/m7shi/m7shi2n.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -390,11 +390,11 @@ machine_at_tc430hx_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined2(L"roms/machines/socket7/tc430hx/1007dh0_.bio", - L"roms/machines/socket7/tc430hx/1007dh0_.bi1", - L"roms/machines/socket7/tc430hx/1007dh0_.bi2", - L"roms/machines/socket7/tc430hx/1007dh0_.bi3", - L"roms/machines/socket7/tc430hx/1007dh0_.rcv", + ret = bios_load_linear_combined2(L"roms/machines/tc430hx/1007dh0_.bio", + L"roms/machines/tc430hx/1007dh0_.bi1", + L"roms/machines/tc430hx/1007dh0_.bi2", + L"roms/machines/tc430hx/1007dh0_.bi3", + L"roms/machines/tc430hx/1007dh0_.rcv", 0x3a000, 128); if (bios_only || !ret) @@ -425,11 +425,11 @@ machine_at_equium5200_init(const machine_t *model) // Information about that mac { int ret; - ret = bios_load_linear_combined2(L"roms/machines/socket7/equium5200/1003DK08.BIO", - L"roms/machines/socket7/equium5200/1003DK08.BI1", - L"roms/machines/socket7/equium5200/1003DK08.BI2", - L"roms/machines/socket7/equium5200/1003DK08.BI3", - L"roms/machines/socket7/equium5200/1003DK08.RCV", + ret = bios_load_linear_combined2(L"roms/machines/equium5200/1003DK08.BIO", + L"roms/machines/equium5200/1003DK08.BI1", + L"roms/machines/equium5200/1003DK08.BI2", + L"roms/machines/equium5200/1003DK08.BI3", + L"roms/machines/equium5200/1003DK08.RCV", 0x3a000, 128); if (bios_only || !ret) @@ -475,7 +475,7 @@ machine_at_p55tvp4_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/p55tvp4/0204_128.BIN", + ret = bios_load_linear(L"roms/machines/p55tvp4/0204_128.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -504,7 +504,7 @@ machine_at_i430vx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/430vx/55xwuq0e.bin", + ret = bios_load_linear(L"roms/machines/430vx/55xwuq0e.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -533,7 +533,7 @@ machine_at_p55va_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/p55va/va021297.bin", + ret = bios_load_linear(L"roms/machines/p55va/va021297.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -562,7 +562,7 @@ machine_at_brio80xx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/brio80xx/Hf0705.rom", + ret = bios_load_linear(L"roms/machines/brio80xx/Hf0705.rom", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -591,11 +591,11 @@ machine_at_pb680_init(const machine_t *model) { int ret; - ret = bios_load_linear_combined2(L"roms/machines/socket7/pb680/1012DN0R.BIO", - L"roms/machines/socket7/pb680/1012DN0R.BI1", - L"roms/machines/socket7/pb680/1012DN0R.BI2", - L"roms/machines/socket7/pb680/1012DN0R.BI3", - L"roms/machines/socket7/pb680/1012DN0R.RCV", + ret = bios_load_linear_combined2(L"roms/machines/pb680/1012DN0R.BIO", + L"roms/machines/pb680/1012DN0R.BI1", + L"roms/machines/pb680/1012DN0R.BI2", + L"roms/machines/pb680/1012DN0R.BI3", + L"roms/machines/pb680/1012DN0R.RCV", 0x3a000, 128); if (bios_only || !ret) @@ -625,7 +625,7 @@ machine_at_nupro592_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/nupro592/np590b10.bin", + ret = bios_load_linear(L"roms/machines/nupro592/np590b10.bin", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -692,7 +692,7 @@ machine_at_tx97_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/tx97/0112.001", + ret = bios_load_linear(L"roms/machines/tx97/0112.001", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -760,7 +760,7 @@ machine_at_ym430tx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/ym430tx/YM430TX.003", + ret = bios_load_linear(L"roms/machines/ym430tx/YM430TX.003", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -793,7 +793,7 @@ machine_at_586t2_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/586t2/5itw001.bin", + ret = bios_load_linear(L"roms/machines/586t2/5itw001.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -824,7 +824,7 @@ machine_at_807ds_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/807ds/Tx0212g.rom", + ret = bios_load_linear(L"roms/machines/807ds/Tx0212g.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -855,7 +855,7 @@ machine_at_p5mms98_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/p5mms98/s981182.rom", + ret = bios_load_linear(L"roms/machines/p5mms98/s981182.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -920,7 +920,7 @@ machine_at_ficva502_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/ficva502/VA502bp.BIN", + ret = bios_load_linear(L"roms/machines/ficva502/VA502bp.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -949,7 +949,7 @@ machine_at_ficpa2012_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/ficpa2012/113jb16.awd", + ret = bios_load_linear(L"roms/machines/ficpa2012/113jb16.awd", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -979,7 +979,7 @@ machine_at_advanceii_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket7/advanceii/VP3_V27.BIN", + ret = bios_load_linear(L"roms/machines/advanceii/VP3_V27.BIN", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_socket8.c b/src/machine/m_at_socket8.c index 19b99927f..fd7b5bcea 100644 --- a/src/machine/m_at_socket8.c +++ b/src/machine/m_at_socket8.c @@ -46,7 +46,7 @@ machine_at_686nx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket8/686nx/6nx.140", + ret = bios_load_linear(L"roms/machines/686nx/6nx.140", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -76,7 +76,7 @@ machine_at_mb600n_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket8/mb600n/60915cs.rom", + ret = bios_load_linear(L"roms/machines/mb600n/60915cs.rom", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -105,7 +105,7 @@ machine_at_8500ttc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket8/8500ttc/TTC0715B.ROM", + ret = bios_load_linear(L"roms/machines/8500ttc/TTC0715B.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -134,7 +134,7 @@ machine_at_m6mi_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/socket8/m6mi/M6MI05.ROM", + ret = bios_load_linear(L"roms/machines/m6mi/M6MI05.ROM", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_super7_ss7.c b/src/machine/m_at_super7_ss7.c index c53123a99..bc876a206 100644 --- a/src/machine/m_at_super7_ss7.c +++ b/src/machine/m_at_super7_ss7.c @@ -50,7 +50,7 @@ machine_at_ax59pro_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/super7/ax59pro/AX59P236.BIN", + ret = bios_load_linear(L"roms/machines/ax59pro/AX59P236.BIN", 0x000c0000, 262144, 0); if (bios_only || !ret) @@ -82,7 +82,7 @@ machine_at_mvp3_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/super7/ficva503p/je4333.bin", + ret = bios_load_linear(L"roms/machines/ficva503p/je4333.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_europc.c b/src/machine/m_europc.c index d5eb0ffee..1ce423ee7 100644 --- a/src/machine/m_europc.c +++ b/src/machine/m_europc.c @@ -710,7 +710,7 @@ machine_europc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/europc/50145", + ret = bios_load_linear(L"roms/machines/europc/50145", 0x000f8000, 32768, 0); if (bios_only || !ret) diff --git a/src/machine/m_ps1.c b/src/machine/m_ps1.c index 14efd9365..9295b5b7b 100644 --- a/src/machine/m_ps1.c +++ b/src/machine/m_ps1.c @@ -452,7 +452,7 @@ ps1_setup(int model) if (model == 2011) { rom_init(&ps->high_rom, - L"roms/machines/ps1/ibmps1es/f80000.bin", + L"roms/machines/ibmps1es/f80000.bin", 0xf80000, 0x80000, 0x7ffff, 0, MEM_MAPPING_EXTERNAL); lpt2_remove(); @@ -475,7 +475,7 @@ ps1_setup(int model) #if 0 rom_init(&ps->high_rom, - L"roms/machines/ps1/ibmps1_2121/fc0000.bin", + L"roms/machines/ibmps1_2121/fc0000.bin", 0xfc0000, 0x20000, 0x1ffff, 0, MEM_MAPPING_EXTERNAL); #endif @@ -533,7 +533,7 @@ machine_ps1_m2011_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ps1/ibmps1es/f80000.bin", + ret = bios_load_linear(L"roms/machines/ibmps1es/f80000.bin", 0x000e0000, 131072, 0x60000); if (bios_only || !ret) @@ -552,7 +552,7 @@ machine_ps1_m2121_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ps1/ibmps1_2121/fc0000.bin", + ret = bios_load_linear(L"roms/machines/ibmps1_2121/fc0000.bin", 0x000e0000, 131072, 0x20000); if (bios_only || !ret) @@ -572,7 +572,7 @@ machine_ps1_m2133_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/ps1/ibmps1_2133/ps1_2133_52g2974_rom.bin", + ret = bios_load_linear(L"roms/machines/ibmps1_2133/ps1_2133_52g2974_rom.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_ps2_isa.c b/src/machine/m_ps2_isa.c index a66578c8c..9300d05d4 100644 --- a/src/machine/m_ps2_isa.c +++ b/src/machine/m_ps2_isa.c @@ -166,7 +166,7 @@ machine_ps2_m30_286_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/ps2/ibmps2_m30_286/33f5381a.bin", + ret = bios_load_linear(L"roms/machines/ibmps2_m30_286/33f5381a.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_ps2_mca.c b/src/machine/m_ps2_mca.c index 85295b983..5a1bf3fd5 100644 --- a/src/machine/m_ps2_mca.c +++ b/src/machine/m_ps2_mca.c @@ -1269,11 +1269,11 @@ machine_ps2_model_50_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m50/90x7420.zm13", - L"roms/machines/ps2/ibmps2_m50/90x7429.zm18", + ret = bios_load_interleaved(L"roms/machines/ibmps2_m50/90x7420.zm13", + L"roms/machines/ibmps2_m50/90x7429.zm18", 0x000f0000, 131072, 0); - ret &= bios_load_aux_interleaved(L"roms/machines/ps2/ibmps2_m50/90x7423.zm14", - L"roms/machines/ps2/ibmps2_m50/90x7426.zm16", + ret &= bios_load_aux_interleaved(L"roms/machines/ibmps2_m50/90x7423.zm14", + L"roms/machines/ibmps2_m50/90x7426.zm16", 0x000e0000, 65536, 0); if (bios_only || !ret) @@ -1292,8 +1292,8 @@ machine_ps2_model_55sx_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m55sx/33f8146.zm41", - L"roms/machines/ps2/ibmps2_m55sx/33f8145.zm40", + ret = bios_load_interleaved(L"roms/machines/ibmps2_m55sx/33f8146.zm41", + L"roms/machines/ibmps2_m55sx/33f8145.zm40", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1312,8 +1312,8 @@ machine_ps2_model_70_type3_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m70_type3/70-a_even.bin", - L"roms/machines/ps2/ibmps2_m70_type3/70-a_odd.bin", + ret = bios_load_interleaved(L"roms/machines/ibmps2_m70_type3/70-a_even.bin", + L"roms/machines/ibmps2_m70_type3/70-a_odd.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1333,8 +1333,8 @@ machine_ps2_model_70_type4_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m70_type4/70-b_even.bin", - L"roms/machines/ps2/ibmps2_m70_type4/70-b_odd.bin", + ret = bios_load_interleaved(L"roms/machines/ibmps2_m70_type4/70-b_even.bin", + L"roms/machines/ibmps2_m70_type4/70-b_odd.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1354,8 +1354,8 @@ machine_ps2_model_80_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/ps2/ibmps2_m80/15f6637.bin", - L"roms/machines/ps2/ibmps2_m80/15f6639.bin", + ret = bios_load_interleaved(L"roms/machines/ibmps2_m80/15f6637.bin", + L"roms/machines/ibmps2_m80/15f6639.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index d39f52276..3fee77bba 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -1446,8 +1446,8 @@ init_rom(tandy_t *dev) dev->rom = (uint8_t *)malloc(0x80000); #if 1 - if (! rom_load_interleaved(L"roms/machines/tandy/tandy1000sl2/8079047.hu1", - L"roms/machines/tandy/tandy1000sl2/8079048.hu2", + if (! rom_load_interleaved(L"roms/machines/tandy1000sl2/8079047.hu1", + L"roms/machines/tandy1000sl2/8079048.hu2", 0x000000, 0x80000, 0, dev->rom)) { tandy_log("TANDY: unable to load BIOS for 1000/SL2 !\n"); free(dev->rom); @@ -1455,8 +1455,8 @@ init_rom(tandy_t *dev) return; } #else - f = rom_fopen(L"roms/machines/tandy/tandy1000sl2/8079047.hu1", L"rb"); - ff = rom_fopen(L"roms/machines/tandy/tandy1000sl2/8079048.hu2", L"rb"); + f = rom_fopen(L"roms/machines/tandy1000sl2/8079047.hu1", L"rb"); + ff = rom_fopen(L"roms/machines/tandy1000sl2/8079048.hu2", L"rb"); for (c = 0x0000; c < 0x80000; c += 2) { dev->rom[c] = getc(f); dev->rom[c + 1] = getc(ff); @@ -1545,7 +1545,7 @@ machine_tandy_init(const machine_t *model) { int ret; - ret = bios_load_linearr(L"roms/machines/tandy/tandy/tandy1t1.020", + ret = bios_load_linearr(L"roms/machines/tandy/tandy1t1.020", 0x000f0000, 131072, 0); if (bios_only || !ret) @@ -1562,7 +1562,7 @@ machine_tandy1000hx_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/tandy/tandy1000hx/v020000.u12", + ret = bios_load_linear(L"roms/machines/tandy1000hx/v020000.u12", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -1579,8 +1579,8 @@ machine_tandy1000sl2_init(const machine_t *model) { int ret; - ret = bios_load_interleaved(L"roms/machines/tandy/tandy1000sl2/8079047.hu1", - L"roms/machines/tandy/tandy1000sl2/8079048.hu2", + ret = bios_load_interleaved(L"roms/machines/tandy1000sl2/8079047.hu1", + L"roms/machines/tandy1000sl2/8079048.hu2", 0x000f0000, 65536, 0x18000); if (bios_only || !ret) diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index 6d1dd97ab..0cbf071d1 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -36,16 +36,16 @@ machine_pc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/ibmpc/BIOS_5150_24APR81_U33.BIN", + ret = bios_load_linear(L"roms/machines/ibmpc/BIOS_5150_24APR81_U33.BIN", 0x000fe000, 40960, 0); if (ret) { - bios_load_aux_linear(L"roms/machines/xt/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U29 - 5700019.bin", + bios_load_aux_linear(L"roms/machines/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U29 - 5700019.bin", 0x000f6000, 8192, 0); - bios_load_aux_linear(L"roms/machines/xt/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U30 - 5700027.bin", + bios_load_aux_linear(L"roms/machines/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U30 - 5700027.bin", 0x000f8000, 8192, 0); - bios_load_aux_linear(L"roms/machines/xt/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U31 - 5700035.bin", + bios_load_aux_linear(L"roms/machines/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U31 - 5700035.bin", 0x000fa000, 8192, 0); - bios_load_aux_linear(L"roms/machines/xt/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U32 - 5700043.bin", + bios_load_aux_linear(L"roms/machines/ibmpc/IBM 5150 - Cassette BASIC version C1.00 - U32 - 5700043.bin", 0x000fc000, 8192, 0); } @@ -65,19 +65,19 @@ machine_pc82_init(const machine_t *model) { int ret, ret2; - ret = bios_load_linear(L"roms/machines/xt/ibmpc82/pc102782.bin", + ret = bios_load_linear(L"roms/machines/ibmpc82/pc102782.bin", 0x000fe000, 40960, 0); if (ret) { - ret2 = bios_load_aux_linear(L"roms/machines/xt/ibmpc82/ibm-basic-1.10.rom", + ret2 = bios_load_aux_linear(L"roms/machines/ibmpc82/ibm-basic-1.10.rom", 0x000f6000, 32768, 0); if (!ret2) { - bios_load_aux_linear(L"roms/machines/xt/ibmpc82/basicc11.f6", + bios_load_aux_linear(L"roms/machines/ibmpc82/basicc11.f6", 0x000f6000, 8192, 0); - bios_load_aux_linear(L"roms/machines/xt/ibmpc82/basicc11.f8", + bios_load_aux_linear(L"roms/machines/ibmpc82/basicc11.f8", 0x000f8000, 8192, 0); - bios_load_aux_linear(L"roms/machines/xt/ibmpc82/basicc11.fa", + bios_load_aux_linear(L"roms/machines/ibmpc82/basicc11.fa", 0x000fa000, 8192, 0); - bios_load_aux_linear(L"roms/machines/xt/ibmpc82/basicc11.fc", + bios_load_aux_linear(L"roms/machines/ibmpc82/basicc11.fc", 0x000fc000, 8192, 0); } } @@ -108,15 +108,15 @@ machine_xt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/ibmxt/xt.rom", + ret = bios_load_linear(L"roms/machines/ibmxt/xt.rom", 0x000f0000, 65536, 0); if (!ret) { - ret = bios_load_linear(L"roms/machines/xt/ibmxt/1501512.u18", + ret = bios_load_linear(L"roms/machines/ibmxt/1501512.u18", 0x000fe000, 65536, 0x6000); if (ret) { - bios_load_aux_linear(L"roms/machines/xt/ibmxt/1501512.u18", + bios_load_aux_linear(L"roms/machines/ibmxt/1501512.u18", 0x000f8000, 24576, 0); - bios_load_aux_linear(L"roms/machines/xt/ibmxt/5000027.u19", + bios_load_aux_linear(L"roms/machines/ibmxt/5000027.u19", 0x000f0000, 32768, 0); } } @@ -137,7 +137,7 @@ machine_genxt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/genxt/pcxt.rom", + ret = bios_load_linear(L"roms/machines/genxt/pcxt.rom", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -154,12 +154,12 @@ machine_xt86_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", + ret = bios_load_linear(L"roms/machines/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", 0x000fe000, 65536, 0x6000); if (ret) { - (void) bios_load_aux_linear(L"roms/machines/xt/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", + (void) bios_load_aux_linear(L"roms/machines/ibmxt86/BIOS_5160_09MAY86_U18_59X7268_62X0890_27256_F800.BIN", 0x000f8000, 24576, 0); - (void) bios_load_aux_linear(L"roms/machines/xt/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", + (void) bios_load_aux_linear(L"roms/machines/ibmxt86/BIOS_5160_09MAY86_U19_62X0819_68X4370_27256_F000.BIN", 0x000f0000, 32768, 0); } @@ -189,7 +189,7 @@ machine_xt_amixt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/amixt/ami_8088_bios_31jan89.bin", + ret = bios_load_linear(L"roms/machines/amixt/ami_8088_bios_31jan89.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -206,7 +206,7 @@ machine_xt_dtk_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/dtk/dtk_erso_2.42_2764.bin", + ret = bios_load_linear(L"roms/machines/dtk/dtk_erso_2.42_2764.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -223,7 +223,7 @@ machine_xt_jukopc_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/jukopc/000o001.bin", + ret = bios_load_linear(L"roms/machines/jukopc/000o001.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -240,7 +240,7 @@ machine_xt_open_xt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/open_xt/pcxt31.bin", + ret = bios_load_linear(L"roms/machines/open_xt/pcxt31.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -256,7 +256,7 @@ machine_xt_hed919_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/hed919/Hedaka_HED-919_bios_version_3.28f.bin", + ret = bios_load_linear(L"roms/machines/hed919/Hedaka_HED-919_bios_version_3.28f.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -272,7 +272,7 @@ machine_xt_pxxt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/pxxt/000p001.bin", + ret = bios_load_linear(L"roms/machines/pxxt/000p001.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) diff --git a/src/machine/m_xt_compaq.c b/src/machine/m_xt_compaq.c index d91be442b..575500ffb 100644 --- a/src/machine/m_xt_compaq.c +++ b/src/machine/m_xt_compaq.c @@ -42,7 +42,7 @@ machine_xt_compaq_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/compaq/portable/compaq portable plus 100666-001 rev c u47.bin", + ret = bios_load_linear(L"roms/machines/portable/compaq portable plus 100666-001 rev c u47.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) diff --git a/src/machine/m_xt_laserxt.c b/src/machine/m_xt_laserxt.c index 771e1f1db..d0b0fdf81 100644 --- a/src/machine/m_xt_laserxt.c +++ b/src/machine/m_xt_laserxt.c @@ -139,7 +139,7 @@ machine_xt_laserxt_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/ltxt/27c64.bin", + ret = bios_load_linear(L"roms/machines/ltxt/27c64.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) @@ -158,7 +158,7 @@ machine_xt_lxt3_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/lxt3/27c64d.bin", + ret = bios_load_linear(L"roms/machines/lxt3/27c64d.bin", 0x000fe000, 8192, 0); if (bios_only || !ret) diff --git a/src/machine/m_xt_t1000.c b/src/machine/m_xt_t1000.c index a0881c30e..bf31be9f7 100644 --- a/src/machine/m_xt_t1000.c +++ b/src/machine/m_xt_t1000.c @@ -858,7 +858,7 @@ machine_xt_t1000_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/t1000/t1000/t1000.rom", + ret = bios_load_linear(L"roms/machines/t1000/t1000.rom", 0x000f8000, 32768, 0); if (bios_only || !ret) @@ -870,7 +870,7 @@ machine_xt_t1000_init(const machine_t *model) t1000.ems_port_index = 7; /* EMS disabled */ /* Load the T1000 CGA Font ROM. */ - loadfont(L"roms/machines/t1000/t1000/t1000font.rom", 2); + loadfont(L"roms/machines/t1000/t1000font.rom", 2); /* * The ROM drive is optional. @@ -878,7 +878,7 @@ machine_xt_t1000_init(const machine_t *model) * If the file is missing, continue to boot; the BIOS will * complain 'No ROM drive' but boot normally from floppy. */ - f = rom_fopen(L"roms/machines/t1000/t1000/t1000dos.rom", L"rb"); + f = rom_fopen(L"roms/machines/t1000/t1000dos.rom", L"rb"); if (f != NULL) { t1000.romdrive = malloc(T1000_ROMSIZE); if (t1000.romdrive) { @@ -951,7 +951,7 @@ machine_xt_t1200_init(const machine_t *model) int ret; - ret = bios_load_linear(L"roms/machines/t1000/t1200/t1200_019e.ic15.bin", + ret = bios_load_linear(L"roms/machines/t1200/t1200_019e.ic15.bin", 0x000f8000, 32768, 0); if (bios_only || !ret) @@ -962,7 +962,7 @@ machine_xt_t1200_init(const machine_t *model) t1000.ems_port_index = 7; /* EMS disabled */ /* Load the T1200 CGA Font ROM. */ - loadfont(L"roms/machines/t1000/t1200/t1000font.bin", 2); + loadfont(L"roms/machines/t1200/t1000font.bin", 2); /* Map the EMS page frame */ for (pg = 0; pg < 4; pg++) { diff --git a/src/machine/m_xt_xi8088.c b/src/machine/m_xt_xi8088.c index 0fde7f97d..875a2ba11 100644 --- a/src/machine/m_xt_xi8088.c +++ b/src/machine/m_xt_xi8088.c @@ -151,18 +151,18 @@ machine_xt_xi8088_init(const machine_t *model) int ret; if (bios_only) { - ret = bios_load_linear_inverted(L"roms/machines/xt/xi8088/bios-xi8088-128k.bin", + ret = bios_load_linear_inverted(L"roms/machines/xi8088/bios-xi8088-128k.bin", 0x000e0000, 131072, 0); - ret |= bios_load_linear(L"roms/machines/xt/xi8088/bios-xi8088.bin", + ret |= bios_load_linear(L"roms/machines/xi8088/bios-xi8088.bin", 0x000f0000, 65536, 0); } else { device_add(&xi8088_device); if (xi8088_bios_128kb()) { - ret = bios_load_linear_inverted(L"roms/machines/xt/xi8088/bios-xi8088-128k.bin", + ret = bios_load_linear_inverted(L"roms/machines/xi8088/bios-xi8088-128k.bin", 0x000e0000, 131072, 0); } else { - ret = bios_load_linear(L"roms/machines/xt/xi8088/bios-xi8088.bin", + ret = bios_load_linear(L"roms/machines/xi8088/bios-xi8088.bin", 0x000f0000, 65536, 0); } } diff --git a/src/machine/m_xt_zenith.c b/src/machine/m_xt_zenith.c index 917fc9080..0d527d20b 100644 --- a/src/machine/m_xt_zenith.c +++ b/src/machine/m_xt_zenith.c @@ -109,7 +109,7 @@ machine_xt_zenith_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/xt/zdsupers/z184m v3.1d.10d", + ret = bios_load_linear(L"roms/machines/zdsupers/z184m v3.1d.10d", 0x000f8000, 32768, 0); if (bios_only || !ret) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index d03ca41a2..255f893e7 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -206,7 +206,6 @@ const machine_t machines[] = { { "[486 PCI] Zida Tomato 4DP", "4dps", {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 255, 1, 127, machine_at_4dps_init, NULL }, /* Socket 4 machines */ - /* 430LX */ { "[Socket 4 LX] IBM Ambra DP60 PCI", "ambradp60", {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 2, 128, 2, 127, machine_at_ambradp60_init, NULL }, #if defined(DEV_BRANCH) && defined(USE_VPP60) From 0ba69bfcd56853a1a533ceefb126229f5b0f9591 Mon Sep 17 00:00:00 2001 From: tiseno100 <58827426+tiseno100@users.noreply.github.com> Date: Sat, 23 May 2020 21:47:57 +0300 Subject: [PATCH 10/35] Replaced the 430TX Hiflex board with one 430VX More stable than the previous one. --- src/include/86box/machine.h | 2 +- src/machine/m_at_socket7_s7.c | 60 +++++++++++++++++------------------ src/machine/machine_table.c | 4 +-- 3 files changed, 31 insertions(+), 35 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 9b5dc8317..f1a76487a 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -298,6 +298,7 @@ extern int machine_at_p55tvp4_init(const machine_t *); extern int machine_at_p55va_init(const machine_t *); extern int machine_at_i430vx_init(const machine_t *); extern int machine_at_brio80xx_init(const machine_t *); +extern int machine_at_8500tvxa_init(const machine_t *); extern int machine_at_pb680_init(const machine_t *); extern int machine_at_nupro592_init(const machine_t *); @@ -305,7 +306,6 @@ extern int machine_at_tx97_init(const machine_t *); extern int machine_at_ym430tx_init(const machine_t *); #if defined(DEV_BRANCH) && defined(NO_SIO) extern int machine_at_586t2_init(const machine_t *); -extern int machine_at_807ds_init(const machine_t *); #endif extern int machine_at_p5mms98_init(const machine_t *); diff --git a/src/machine/m_at_socket7_s7.c b/src/machine/m_at_socket7_s7.c index de015103b..e41a39013 100644 --- a/src/machine/m_at_socket7_s7.c +++ b/src/machine/m_at_socket7_s7.c @@ -586,6 +586,35 @@ machine_at_brio80xx_init(const machine_t *model) return ret; } +int +machine_at_8500tvxa_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear(L"roms/machines/8500tvxa/tvx0619b.rom", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 2, 1); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 3, 2, 1); + device_add(&i430vx_device); + device_add(&piix3_device); + device_add(&keyboard_ps2_ami_pci_device); + device_add(&um8669f_device); + device_add(&sst_flash_29ee010_device); + + return ret; +} + int machine_at_pb680_init(const machine_t *model) { @@ -817,37 +846,6 @@ machine_at_586t2_init(const machine_t *model) return ret; } - - -int -machine_at_807ds_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear(L"roms/machines/807ds/Tx0212g.rom", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ - pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); - device_add(&i430tx_device); - device_add(&piix4_device); - device_add(&keyboard_ps2_ami_pci_device); - device_add(&um8669f_device); /*Placeholder for ITE 8679*/ - device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_SDRAM, 0x3, 128); - - return ret; -} #endif int diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 255f893e7..b345d052b 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -254,6 +254,7 @@ const machine_t machines[] = { { "[Socket 7 VX] Shuttle HOT-557", "430vx", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 128, 8, 127, machine_at_i430vx_init, NULL }, { "[Socket 7 VX] Epox P55-VA", "p55va", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 128, 8, 127, machine_at_p55va_init, NULL }, { "[Socket 7 VX] HP Brio 80xx", "brio80xx", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 128, 8, 127, machine_at_brio80xx_init, NULL }, + { "[Socket 7 VX] Biostar 8500TVX-A", "8500tvxa", {{ "Intel", cpus_Pentium}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 128, 8, 127, machine_at_8500tvxa_init, NULL }, { "[Socket 7 VX] Packard Bell PB680", "pb680", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 128, 8, 127, machine_at_pb680_init, NULL }, /* 430TX */ @@ -263,9 +264,6 @@ const machine_t machines[] = { { "[Socket 7 TX] Gigabyte GA-586T2", "586t2", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_586t2_init, NULL }, #endif { "[Socket 7 TX] Intel YM430TX", "ym430tx", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_ym430tx_init, NULL }, -#if defined(DEV_BRANCH) && defined(NO_SIO) - { "[Socket 7 TX] PC Partner TXA807DS", "807ds", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_807ds_init, NULL }, -#endif { "[Socket 7 TX] Supermicro P5MMS98", "p5mms98", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_p5mms98_init, NULL }, From 3736cb006535336ddc1e5cbac2ad8d248849b28b Mon Sep 17 00:00:00 2001 From: nerd73 Date: Mon, 25 May 2020 20:05:51 -0600 Subject: [PATCH 11/35] Replace the Gigabyte GA-586T2 with the PC Partner MB540N. --- src/include/86box/machine.h | 4 +--- src/machine/m_at_socket7_s7.c | 16 +++++++--------- src/machine/machine_table.c | 4 +--- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index f1a76487a..9741f2bcd 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -304,9 +304,7 @@ extern int machine_at_pb680_init(const machine_t *); extern int machine_at_nupro592_init(const machine_t *); extern int machine_at_tx97_init(const machine_t *); extern int machine_at_ym430tx_init(const machine_t *); -#if defined(DEV_BRANCH) && defined(NO_SIO) -extern int machine_at_586t2_init(const machine_t *); -#endif +extern int machine_at_mb540n_init(const machine_t *); extern int machine_at_p5mms98_init(const machine_t *); extern int machine_at_ficva502_init(const machine_t *); diff --git a/src/machine/m_at_socket7_s7.c b/src/machine/m_at_socket7_s7.c index e41a39013..a53216e1f 100644 --- a/src/machine/m_at_socket7_s7.c +++ b/src/machine/m_at_socket7_s7.c @@ -816,13 +816,12 @@ machine_at_ym430tx_init(const machine_t *model) return ret; } -#if defined(DEV_BRANCH) && defined(NO_SIO) int -machine_at_586t2_init(const machine_t *model) +machine_at_mb540n_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/586t2/5itw001.bin", + ret = bios_load_linear(L"roms/machines/mb540n/Tx0720ug.bin", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -832,21 +831,20 @@ machine_at_586t2_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x11, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x12, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x13, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); /* PIIX4 */ device_add(&i430tx_device); device_add(&piix4_device); device_add(&keyboard_ps2_pci_device); - device_add(&um8669f_device); /*Placeholder for ITE 8679*/ + device_add(&um8669f_device); device_add(&sst_flash_29ee010_device); spd_register(SPD_TYPE_SDRAM, 0x3, 128); return ret; } -#endif int machine_at_p5mms98_init(const machine_t *model) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index b345d052b..339e07dff 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -260,10 +260,8 @@ const machine_t machines[] = { /* 430TX */ { "[Socket 7 TX] ADLink NuPRO-592", "nupro592", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_nupro592_init, NULL }, { "[Socket 7 TX] ASUS TX97", "tx97", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_tx97_init, NULL }, -#if defined(DEV_BRANCH) && defined(NO_SIO) - { "[Socket 7 TX] Gigabyte GA-586T2", "586t2", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_586t2_init, NULL }, -#endif { "[Socket 7 TX] Intel YM430TX", "ym430tx", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_ym430tx_init, NULL }, + { "[Socket 7 TX] PC Partner MB540N", "mb540n", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_mb540n_init, NULL }, { "[Socket 7 TX] Supermicro P5MMS98", "p5mms98", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 255, machine_at_p5mms98_init, NULL }, From b07807e9de9e144857c0e37359fc44489846d69c Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 26 May 2020 05:24:55 +0200 Subject: [PATCH 12/35] Fixed ide_get_period() to correctly use shifted mode values, fixes IDE timings. --- src/disk/hdc_ide.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 0c0453cb1..4312bf54e 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -182,67 +182,67 @@ ide_get_period(ide_t *ide, int size) switch(ide->mdma_mode & 0x300) { case 0x000: /* PIO */ switch(ide->mdma_mode & 0xff) { - case 0: + case 0x01: period = (10.0 / 3.0); break; - case 1: + case 0x02: period = (20.0 / 3.83); break; - case 2: + case 0x04: period = (25.0 / 3.0); break; - case 3: + case 0x08: period = (100.0 / 9.0); break; - case 4: + case 0x10: period = (50.0 / 3.0); break; } break; case 0x100: /* Single Word DMA */ switch(ide->mdma_mode & 0xff) { - case 0: + case 0x01: period = (25.0 / 12.0); break; - case 1: + case 0x02: period = (25.0 / 6.0); break; - case 2: + case 0x04: period = (25.0 / 3.0); break; } break; case 0x200: /* Multiword DMA */ switch(ide->mdma_mode & 0xff) { - case 0: + case 0x01: period = (25.0 / 6.0); break; - case 1: + case 0x02: period = (40.0 / 3.0); break; - case 2: + case 0x04: period = (50.0 / 3.0); break; } break; case 0x300: /* Ultra DMA */ switch(ide->mdma_mode & 0xff) { - case 0: + case 0x01: period = (50.0 / 3.0); break; - case 1: + case 0x02: period = 25.0; break; - case 2: + case 0x04: period = (100.0 / 3.0); break; - case 3: + case 0x08: period = (400.0 / 9.0); break; - case 4: + case 0x10: period = (200.0 / 3.0); break; - case 5: + case 0x20: period = 100.0; break; } From 2bf573bf9022e58ccde850d4ca0d205a018ea9c5 Mon Sep 17 00:00:00 2001 From: tiseno100 <58827426+tiseno100@users.noreply.github.com> Date: Tue, 26 May 2020 21:22:31 +0300 Subject: [PATCH 13/35] Replace the P6KFX with the KN97 KN97 is a popular Slot 1 FX board included also in the PCem-X days. Thanks to the recent additions it can be reintroduced back. --- src/include/86box/machine.h | 2 +- src/machine/m_at_slot1.c | 43 +++++++++++++++++++++++++++++-------- src/machine/machine_table.c | 2 +- 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 9741f2bcd..09ebce0c8 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -334,7 +334,7 @@ extern int machine_at_p65up5_cp6nd_init(const machine_t *); /* m_at_slot1.c */ extern int machine_at_p65up5_cpknd_init(const machine_t *); -extern int machine_at_p6kfx_init(const machine_t *); +extern int machine_at_kn97_init(const machine_t *); #if defined(DEV_BRANCH) && defined(NO_SIO) extern int machine_at_6bxc_init(const machine_t *); diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index ffac89374..5ec4e0ea0 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -59,11 +59,11 @@ machine_at_p65up5_cpknd_init(const machine_t *model) } int -machine_at_p6kfx_init(const machine_t *model) +machine_at_kn97_init(const machine_t *model) { int ret; - ret = bios_load_linear(L"roms/machines/p6kfx/kfxa22.bin", + ret = bios_load_linear(L"roms/machines/kn97/0116I.001", 0x000e0000, 131072, 0); if (bios_only || !ret) @@ -74,17 +74,42 @@ machine_at_p6kfx_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0C, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i440fx_device); device_add(&piix3_device); - device_add(&keyboard_ps2_ami_pci_device); /*Didn't post with regular PS/2 PCI*/ + device_add(&keyboard_ps2_pci_device); device_add(&w83877f_device); device_add(&intel_flash_bxt_device); - + spd_register(SPD_TYPE_EDO, 0xF, 256); + + hwm_values_t machine_hwm = { + { /* fan speeds */ + 3000, /* Chassis */ + 3000, /* CPU */ + 3000 /* Power */ + }, { /* temperatures */ + 30, /* MB */ + 0, /* unused */ + 27 /* CPU */ + }, { /* voltages */ + 2050, /* VCORE (2.05V by default) */ + 0, /* unused */ + 3300, /* +3.3V */ + RESISTOR_DIVIDER(5000, 11, 16), /* +5V (divider values bruteforced) */ + RESISTOR_DIVIDER(12000, 28, 10), /* +12V (28K/10K divider suggested in the W83781D datasheet) */ + RESISTOR_DIVIDER(12000, 853, 347), /* -12V (divider values bruteforced) */ + RESISTOR_DIVIDER(5000, 1, 2) /* -5V (divider values bruteforced) */ + } + }; + if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_PENTIUM2) + machine_hwm.voltages[0] = 2800; /* set higher VCORE (2.8V) for Klamath */ + hwm_set_values(machine_hwm); + device_add(&lm78_device); + return ret; } diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 339e07dff..10cda31c6 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -291,7 +291,7 @@ const machine_t machines[] = { /* Slot 1 machines */ /* 440FX */ { "[Slot 1 FX] ASUS P/I-P65UP5 (C-PKND)", "p65up5_cpknd", {{"Intel", cpus_PentiumII_28v},{"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_p65up5_cpknd_init, NULL }, - { "[Slot 1 FX] ECS P6KFX-A", "p6kfx", {{"Intel", cpus_PentiumII_28v},{"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 384, 8, 127, machine_at_p6kfx_init, NULL }, + { "[Slot 1 FX] ASUS KN97", "kn97", {{"Intel", cpus_PentiumII_28v}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 384, 8, 127, machine_at_kn97_init, NULL }, /* 440LX */ From ea64a21ca2d86f96479453210ee1b1c1dfe2034f Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Tue, 26 May 2020 23:39:21 -0300 Subject: [PATCH 14/35] Add Cyrix III CPUs to the Soltek SL-63A1 --- 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 b345d052b..da00ab254 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -325,7 +325,7 @@ const machine_t machines[] = { { "[Socket 370 BX] A-Trend ATC7020BXII", "atc7020bxii", {{"Intel", cpus_Celeron}, {"VIA", cpus_Cyrix3}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_atc7020bxii_init, NULL }, /* 440ZX */ - { "[Socket 370 ZX] Soltek SL-63A1", "63a", {{"Intel", cpus_Celeron}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 255, machine_at_63a_init, NULL }, + { "[Socket 370 ZX] Soltek SL-63A1", "63a", {{"Intel", cpus_Celeron}, {"VIA", cpus_Cyrix3}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 255, machine_at_63a_init, NULL }, /* VIA Apollo Pro */ { "[Socket 370 APRO] PC Partner APAS3", "apas3", {{"Intel", cpus_Celeron}, {"VIA", cpus_Cyrix3}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_apas3_init, NULL }, From 35c95ce98559c7d162f0c70c6b851eb5b615245c Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Wed, 27 May 2020 00:06:06 -0300 Subject: [PATCH 15/35] Machine table (and KN97) fixes --- src/cpu_common/cpu.h | 2 +- src/cpu_common/cpu_table.c | 12 +++++++++++- src/machine/m_at_slot1.c | 23 +++++++++-------------- src/machine/machine_table.c | 8 ++++---- 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/cpu_common/cpu.h b/src/cpu_common/cpu.h index 3a7d67d78..e617f4e6d 100644 --- a/src/cpu_common/cpu.h +++ b/src/cpu_common/cpu.h @@ -145,7 +145,7 @@ extern CPU cpus_6x86SS7[]; #endif extern CPU cpus_Cyrix3[]; extern CPU cpus_PentiumPro[]; -extern CPU cpus_PentiumII_28v[]; +extern CPU cpus_PentiumII66[]; extern CPU cpus_PentiumII[]; extern CPU cpus_Xeon[]; extern CPU cpus_Celeron[]; diff --git a/src/cpu_common/cpu_table.c b/src/cpu_common/cpu_table.c index e08f57949..5d8ec3457 100644 --- a/src/cpu_common/cpu_table.c +++ b/src/cpu_common/cpu_table.c @@ -686,7 +686,8 @@ CPU cpus_PentiumPro[] = { {"Pentium II Overdrive 333", CPU_PENTIUM2D, 333333333, 5.0, 0x1632, 0x1632, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 27,27,13,13, 40}, {"", -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }; -CPU cpus_PentiumII_28v[] = { + +CPU cpus_PentiumII66[] = { /*Intel Pentium II Klamath*/ {"Pentium II Klamath 50", CPU_PENTIUM2, 50000000, 1.0, 0x634, 0x634, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 4, 4, 3, 3, 6}, {"Pentium II Klamath 60", CPU_PENTIUM2, 60000000, 1.0, 0x634, 0x634, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 6, 6, 3, 3, 7}, @@ -695,6 +696,15 @@ CPU cpus_PentiumII_28v[] = { {"Pentium II Klamath 233", CPU_PENTIUM2, 233333333, 3.5, 0x634, 0x634, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 21,21,10,10, 28}, {"Pentium II Klamath 266", CPU_PENTIUM2, 266666666, 4.0, 0x634, 0x634, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 24,24,12,12, 32}, {"Pentium II Klamath 300/66", CPU_PENTIUM2, 300000000, 4.5, 0x634, 0x634, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 25,25,12,12, 36}, + + /*Intel Pentium II Deschutes*/ + {"Pentium II Deschutes 50", CPU_PENTIUM2D, 50000000, 1.0, 0x652, 0x652, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 4, 4, 3, 3, 6}, + {"Pentium II Deschutes 60", CPU_PENTIUM2D, 60000000, 1.0, 0x652, 0x652, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 6, 6, 3, 3, 7}, + {"Pentium II Deschutes 66", CPU_PENTIUM2D, 66666666, 1.0, 0x652, 0x652, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 6, 6, 3, 3, 8}, + {"Pentium II Deschutes 75", CPU_PENTIUM2D, 75000000, 1.5, 0x652, 0x652, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 7, 7, 4, 4, 9}, + {"Pentium II Deschutes 266", CPU_PENTIUM2D, 266666666, 4.0, 0x652, 0x652, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 24,24,12,12, 32}, + {"Pentium II Deschutes 300/66", CPU_PENTIUM2D, 300000000, 4.5, 0x651, 0x651, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 25,25,12,12, 36}, + {"Pentium II Deschutes 333", CPU_PENTIUM2D, 333333333, 5.0, 0x651, 0x651, 0, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 27,27,13,13, 40}, {"", -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }; diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 5ec4e0ea0..167b91609 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -73,30 +73,27 @@ machine_at_kn97_init(const machine_t *model) pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); pci_register_slot(0x09, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); device_add(&i440fx_device); device_add(&piix3_device); device_add(&keyboard_ps2_pci_device); device_add(&w83877f_device); device_add(&intel_flash_bxt_device); - spd_register(SPD_TYPE_EDO, 0xF, 256); - + hwm_values_t machine_hwm = { - { /* fan speeds */ - 3000, /* Chassis */ - 3000, /* CPU */ - 3000 /* Power */ + { /* fan speeds (incorrect divisor for some reason) */ + 6000, /* Chassis */ + 6000, /* CPU */ + 6000 /* Power */ }, { /* temperatures */ - 30, /* MB */ - 0, /* unused */ - 27 /* CPU */ + 30 /* MB */ }, { /* voltages */ - 2050, /* VCORE (2.05V by default) */ + 2800, /* VCORE (2.8V by default) */ 0, /* unused */ 3300, /* +3.3V */ RESISTOR_DIVIDER(5000, 11, 16), /* +5V (divider values bruteforced) */ @@ -105,8 +102,6 @@ machine_at_kn97_init(const machine_t *model) RESISTOR_DIVIDER(5000, 1, 2) /* -5V (divider values bruteforced) */ } }; - if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_PENTIUM2) - machine_hwm.voltages[0] = 2800; /* set higher VCORE (2.8V) for Klamath */ hwm_set_values(machine_hwm); device_add(&lm78_device); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index b798869d9..0cf27d2ae 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -281,8 +281,8 @@ const machine_t machines[] = { /* Socket 8 machines */ /* 440FX */ - { "[Socket 8 FX] Gigabyte GA-686NX", "686nx", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_686nx_init, NULL }, - { "[Socket 8 FX] PC Partner MB600N", "mb600n", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_mb600n_init, NULL }, + { "[Socket 8 FX] Gigabyte GA-686NX", "686nx", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 127, machine_at_686nx_init, NULL }, + { "[Socket 8 FX] PC Partner MB600N", "mb600n", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 256, 8, 127, machine_at_mb600n_init, NULL }, { "[Socket 8 FX] Biostar MB-8500ttc", "8500ttc", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_8500ttc_init, NULL }, { "[Socket 8 FX] Micronics M6MI", "m6mi", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 384, 8, 127, machine_at_m6mi_init, NULL }, { "[Socket 8 FX] ASUS P/I-P65UP5 (C-P6ND)", "p65up5_cp6nd", {{"Intel", cpus_PentiumPro}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_p65up5_cp6nd_init, NULL }, @@ -290,8 +290,8 @@ const machine_t machines[] = { /* Slot 1 machines */ /* 440FX */ - { "[Slot 1 FX] ASUS P/I-P65UP5 (C-PKND)", "p65up5_cpknd", {{"Intel", cpus_PentiumII_28v},{"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_p65up5_cpknd_init, NULL }, - { "[Slot 1 FX] ASUS KN97", "kn97", {{"Intel", cpus_PentiumII_28v}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 384, 8, 127, machine_at_kn97_init, NULL }, + { "[Slot 1 FX] ASUS P/I-P65UP5 (C-PKND)", "p65up5_cpknd", {{"Intel", cpus_PentiumII66}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_p65up5_cpknd_init, NULL }, + { "[Slot 1 FX] ASUS KN97", "kn97", {{"Intel", cpus_PentiumII66}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 384, 8, 127, machine_at_kn97_init, NULL }, /* 440LX */ From 1c486904f76a09278775e045419cf412bff8f30d Mon Sep 17 00:00:00 2001 From: TC1995 Date: Fri, 29 May 2020 01:30:06 +0200 Subject: [PATCH 16/35] Fixed format issue with the ESDI AT controller in DOS. --- src/disk/hdc_esdi_at.c | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/src/disk/hdc_esdi_at.c b/src/disk/hdc_esdi_at.c index 759dd5a51..7a40f1ef0 100644 --- a/src/disk/hdc_esdi_at.c +++ b/src/disk/hdc_esdi_at.c @@ -528,14 +528,8 @@ esdi_callback(void *priv) irq_raise(esdi); break; } - - if (hdd_image_read_ex(drive->hdd_num, addr, 1, (uint8_t *)esdi->buffer)) { - esdi->error = ERR_ID_NOT_FOUND; - esdi->status = STAT_READY | STAT_DSC | STAT_ERR; - irq_raise(esdi); - break; - } - + + hdd_image_read(drive->hdd_num, addr, 1, (uint8_t *)esdi->buffer); esdi->pos = 0; esdi->status = STAT_DRQ|STAT_READY|STAT_DSC; irq_raise(esdi); @@ -556,14 +550,8 @@ esdi_callback(void *priv) irq_raise(esdi); break; } - - if (hdd_image_write_ex(drive->hdd_num, addr, 1, (uint8_t *)esdi->buffer)) { - esdi->error = ERR_ID_NOT_FOUND; - esdi->status = STAT_READY | STAT_DSC | STAT_ERR; - irq_raise(esdi); - break; - } - + + hdd_image_write(drive->hdd_num, addr, 1, (uint8_t *)esdi->buffer); irq_raise(esdi); esdi->secount = (esdi->secount - 1) & 0xff; if (esdi->secount) { @@ -590,13 +578,7 @@ esdi_callback(void *priv) break; } - if (hdd_image_read_ex(drive->hdd_num, addr, 1, (uint8_t *)esdi->buffer)) { - esdi->error = ERR_ID_NOT_FOUND; - esdi->status = STAT_READY | STAT_DSC | STAT_ERR; - irq_raise(esdi); - break; - } - + hdd_image_read(drive->hdd_num, addr, 1, (uint8_t *)esdi->buffer); ui_sb_update_icon(SB_HDD|HDD_BUS_ESDI, 1); next_sector(esdi); esdi->secount = (esdi->secount - 1) & 0xff; @@ -623,14 +605,8 @@ esdi_callback(void *priv) irq_raise(esdi); break; } - - if (hdd_image_zero_ex(drive->hdd_num, addr, esdi->secount)) { - esdi->error = ERR_ID_NOT_FOUND; - esdi->status = STAT_READY | STAT_DSC | STAT_ERR; - irq_raise(esdi); - break; - } - + + hdd_image_zero(drive->hdd_num, addr, esdi->secount); esdi->status = STAT_READY|STAT_DSC; irq_raise(esdi); ui_sb_update_icon(SB_HDD|HDD_BUS_ESDI, 1); From 9932a5ee322c820963b92941dbefe847872efbb3 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Fri, 29 May 2020 01:37:54 +0200 Subject: [PATCH 17/35] Minor fix to the fix. --- src/disk/hdc_esdi_at.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/disk/hdc_esdi_at.c b/src/disk/hdc_esdi_at.c index 7a40f1ef0..86f564c8d 100644 --- a/src/disk/hdc_esdi_at.c +++ b/src/disk/hdc_esdi_at.c @@ -805,8 +805,8 @@ wd1007vse1_init(const device_t *info) esdi_read, esdi_readw, NULL, esdi_write, esdi_writew, NULL, esdi); io_sethandler(0x01f1, 7, - esdi_read, NULL, NULL, - esdi_write, NULL, NULL, esdi); + esdi_read, esdi_readw, NULL, + esdi_write, esdi_writew, NULL, esdi); io_sethandler(0x03f6, 1, NULL, NULL, NULL, esdi_write, NULL, NULL, esdi); From 9e119d049716bbac59ed3838df89fad8556d461c Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 29 May 2020 20:23:33 +0200 Subject: [PATCH 18/35] Fixed the ATi Mach64 hardware cursor. --- src/video/vid_ati68860_ramdac.c | 24 ++++++++++++------------ src/video/vid_ati_mach64.c | 12 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/video/vid_ati68860_ramdac.c b/src/video/vid_ati68860_ramdac.c index e8fa1862c..b6703a310 100644 --- a/src/video/vid_ati68860_ramdac.c +++ b/src/video/vid_ati68860_ramdac.c @@ -255,25 +255,25 @@ ati68860_hwcursor_draw(svga_t *svga, int displine) uint32_t col0 = ramdac->pallook[0]; uint32_t col1 = ramdac->pallook[1]; - offset = svga->hwcursor_latch.xoff; - for (x = 0; x < 64 - svga->hwcursor_latch.xoff; x += 4) { - dat = svga->vram[svga->hwcursor_latch.addr + (offset >> 2)]; - if (!(dat & 2)) buffer32->line[displine][svga->hwcursor_latch.x + x + svga->x_add] = (dat & 1) ? col1 : col0; - else if ((dat & 3) == 3) buffer32->line[displine][svga->hwcursor_latch.x + x + svga->x_add] ^= 0xFFFFFF; + offset = svga->dac_hwcursor_latch.xoff; + for (x = 0; x < 64 - svga->dac_hwcursor_latch.xoff; x += 4) { + dat = svga->vram[svga->dac_hwcursor_latch.addr + (offset >> 2)]; + if (!(dat & 2)) buffer32->line[displine][svga->dac_hwcursor_latch.x + x + svga->x_add] = (dat & 1) ? col1 : col0; + else if ((dat & 3) == 3) buffer32->line[displine][svga->dac_hwcursor_latch.x + x + svga->x_add] ^= 0xFFFFFF; dat >>= 2; - if (!(dat & 2)) buffer32->line[displine][svga->hwcursor_latch.x + x + svga->x_add + 1] = (dat & 1) ? col1 : col0; - else if ((dat & 3) == 3) buffer32->line[displine][svga->hwcursor_latch.x + x + svga->x_add + 1] ^= 0xFFFFFF; + if (!(dat & 2)) buffer32->line[displine][svga->dac_hwcursor_latch.x + x + svga->x_add + 1] = (dat & 1) ? col1 : col0; + else if ((dat & 3) == 3) buffer32->line[displine][svga->dac_hwcursor_latch.x + x + svga->x_add + 1] ^= 0xFFFFFF; dat >>= 2; - if (!(dat & 2)) buffer32->line[displine][svga->hwcursor_latch.x + x + svga->x_add + 2] = (dat & 1) ? col1 : col0; - else if ((dat & 3) == 3) buffer32->line[displine][svga->hwcursor_latch.x + x + svga->x_add + 2] ^= 0xFFFFFF; + if (!(dat & 2)) buffer32->line[displine][svga->dac_hwcursor_latch.x + x + svga->x_add + 2] = (dat & 1) ? col1 : col0; + else if ((dat & 3) == 3) buffer32->line[displine][svga->dac_hwcursor_latch.x + x + svga->x_add + 2] ^= 0xFFFFFF; dat >>= 2; - if (!(dat & 2)) buffer32->line[displine][svga->hwcursor_latch.x + x + svga->x_add + 3] = (dat & 1) ? col1 : col0; - else if ((dat & 3) == 3) buffer32->line[displine][svga->hwcursor_latch.x + x + svga->x_add + 3] ^= 0xFFFFFF; + if (!(dat & 2)) buffer32->line[displine][svga->dac_hwcursor_latch.x + x + svga->x_add + 3] = (dat & 1) ? col1 : col0; + else if ((dat & 3) == 3) buffer32->line[displine][svga->dac_hwcursor_latch.x + x + svga->x_add + 3] ^= 0xFFFFFF; dat >>= 2; offset += 4; } - svga->hwcursor_latch.addr += 16; + svga->dac_hwcursor_latch.addr += 16; } diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index e2ad8b649..fd99ac541 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -2276,19 +2276,19 @@ void mach64_ext_writeb(uint32_t addr, uint8_t val, void *p) break; case 0x68: case 0x69: case 0x6a: case 0x6b: WRITE8(addr, mach64->cur_offset, val); - svga->hwcursor.addr = (mach64->cur_offset & 0xfffff) * 8; + svga->dac_hwcursor.addr = (mach64->cur_offset & 0xfffff) * 8; mach64_cursor_dump(mach64); break; case 0x6c: case 0x6d: case 0x6e: case 0x6f: WRITE8(addr, mach64->cur_horz_vert_posn, val); - svga->hwcursor.x = mach64->cur_horz_vert_posn & 0x7ff; - svga->hwcursor.y = (mach64->cur_horz_vert_posn >> 16) & 0x7ff; + svga->dac_hwcursor.x = mach64->cur_horz_vert_posn & 0x7ff; + svga->dac_hwcursor.y = (mach64->cur_horz_vert_posn >> 16) & 0x7ff; mach64_cursor_dump(mach64); break; case 0x70: case 0x71: case 0x72: case 0x73: WRITE8(addr, mach64->cur_horz_vert_off, val); - svga->hwcursor.xoff = mach64->cur_horz_vert_off & 0x3f; - svga->hwcursor.yoff = (mach64->cur_horz_vert_off >> 16) & 0x3f; + svga->dac_hwcursor.xoff = mach64->cur_horz_vert_off & 0x3f; + svga->dac_hwcursor.yoff = (mach64->cur_horz_vert_off >> 16) & 0x3f; mach64_cursor_dump(mach64); break; @@ -2348,7 +2348,7 @@ void mach64_ext_writeb(uint32_t addr, uint8_t val, void *p) WRITE8(addr, mach64->gen_test_cntl, val); ati_eeprom_write(&mach64->eeprom, mach64->gen_test_cntl & 0x10, mach64->gen_test_cntl & 2, mach64->gen_test_cntl & 1); mach64->gen_test_cntl = (mach64->gen_test_cntl & ~8) | (ati_eeprom_read(&mach64->eeprom) ? 8 : 0); - svga->hwcursor.ena = mach64->gen_test_cntl & 0x80; + svga->dac_hwcursor.ena = mach64->gen_test_cntl & 0x80; mach64_cursor_dump(mach64); break; From 1efbab7fecd6982d41f90afaaf43958c1264a371 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 29 May 2020 20:34:27 +0200 Subject: [PATCH 19/35] Added some dword-only things to word functions because of the ISA Mach64. --- src/video/vid_ati_mach64.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index fd99ac541..f18c9b0e9 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -875,6 +875,16 @@ static void mach64_accel_write_fifo_w(mach64_t *mach64, uint32_t addr, uint16_t mach64_blit(val, 16, mach64); break; + case 0x32c: + mach64->context_load_cntl = (mach64->context_load_cntl & 0xffff0000) | val; + break; + + case 0x32e: + mach64->context_load_cntl = (mach64->context_load_cntl & 0x0000ffff) | (val << 16); + if (val & 0x30000) + mach64_load_context(mach64); + break; + default: mach64_accel_write_fifo(mach64, addr, val); mach64_accel_write_fifo(mach64, addr + 1, val >> 8); @@ -2106,6 +2116,13 @@ uint16_t mach64_ext_readw(uint32_t addr, void *p) } else switch (addr & 0x3ff) { + case 0xb4: case 0xb6: + ret = (mach64->bank_w[(addr & 2) >> 1] >> 15); + break; + case 0xb8: case 0xba: + ret = (mach64->bank_r[(addr & 2) >> 1] >> 15); + break; + default: ret = mach64_ext_readb(addr, p); ret |= mach64_ext_readb(addr + 1, p) << 8; @@ -2137,7 +2154,7 @@ uint32_t mach64_ext_readl(uint32_t addr, void *p) case 0xb8: ret = (mach64->bank_r[0] >> 15) | ((mach64->bank_r[1] >> 15) << 16); break; - + default: ret = mach64_ext_readw(addr, p); ret |= mach64_ext_readw(addr + 2, p) << 16; From df05daca5152c403ff8fad163c23a585a76bf8d4 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 29 May 2020 20:36:34 +0200 Subject: [PATCH 20/35] Fixed a compile-breaking mistake in mach64_ext_readw(). --- src/video/vid_ati_mach64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/vid_ati_mach64.c b/src/video/vid_ati_mach64.c index f18c9b0e9..a96184b2b 100644 --- a/src/video/vid_ati_mach64.c +++ b/src/video/vid_ati_mach64.c @@ -2108,6 +2108,7 @@ uint8_t mach64_ext_readb(uint32_t addr, void *p) } uint16_t mach64_ext_readw(uint32_t addr, void *p) { + mach64_t *mach64 = (mach64_t *)p; uint16_t ret; if (!(addr & 0x400)) { From 228e3f999c8e08f9df3297495ef2fc469ee40602 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 31 May 2020 04:49:23 +0200 Subject: [PATCH 21/35] Sanitized reset handling and removed excess logging from postcard.c. --- src/include/86box/86box.h | 1 - src/pc.c | 20 -------------------- src/postcard.c | 3 --- src/win/win_ui.c | 8 ++++---- 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index ef0878b46..b29f17c6e 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -171,7 +171,6 @@ extern void pc_close(void *threadid); extern void pc_reset_hard_close(void); extern void pc_reset_hard_init(void); extern void pc_reset_hard(void); -extern void pc_reset(int hard); extern void pc_full_speed(void); extern void pc_speed_changed(void); extern void pc_send_cad(void); diff --git a/src/pc.c b/src/pc.c index 9bc25aa54..28a5a2b58 100644 --- a/src/pc.c +++ b/src/pc.c @@ -819,26 +819,6 @@ pc_reset_hard(void) } -void -pc_reset(int hard) -{ - plat_pause(1); - - plat_delay_ms(100); - - nvr_save(); - - config_save(); - - if (hard) - pc_reset_hard(); - else - pc_send_cad(); - - plat_pause(0); -} - - void pc_close(thread_t *ptr) { diff --git a/src/postcard.c b/src/postcard.c index 91275ee16..683abb13b 100644 --- a/src/postcard.c +++ b/src/postcard.c @@ -99,9 +99,6 @@ postcard_write(uint16_t port, uint8_t val, void *priv) if (postcard_written && val == postcard_code) return; - if (val == 0x13) - pclog("[%04X:%08X] POST 13\n", CS, cpu_state.pc); - postcard_prev_code = postcard_code; postcard_code = val; if (postcard_written < 2) diff --git a/src/win/win_ui.c b/src/win/win_ui.c index b33114ba2..c4b1271e9 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -314,12 +314,12 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) win_notify_dlg_open(); i = ui_msgbox(MBX_QUESTION_YN, (wchar_t *)IDS_2112); if (i == 0) - pc_reset(1); + pc_reset_hard(); win_notify_dlg_closed(); break; case IDM_ACTION_RESET_CAD: - pc_reset(0); + pc_send_cad(); break; case IDM_ACTION_EXIT: @@ -733,7 +733,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) win_notify_dlg_open(); i = ui_msgbox(MBX_QUESTION_YN, (wchar_t *)IDS_2112); if (i == 0) - pc_reset(1); + pc_reset_hard(); win_notify_dlg_closed(); break; @@ -757,7 +757,7 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (manager_wm) break; manager_wm = 1; - pc_reset(0); + pc_send_cad(); manager_wm = 0; break; From 55968558713bc337b67135b3b57eb6c63e9c4887 Mon Sep 17 00:00:00 2001 From: nerd73 Date: Sat, 30 May 2020 21:02:23 -0600 Subject: [PATCH 22/35] Improved EBL_CR_POWERON MSR Improves emulation of the EBL_CR_POWERON MSR on Intel P6 and VIA C3 CPUs. Also makes a fix to a logging bug. --- src/cpu_common/cpu.c | 64 +++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/src/cpu_common/cpu.c b/src/cpu_common/cpu.c index 8e88e9f4b..8a10948ac 100644 --- a/src/cpu_common/cpu.c +++ b/src/cpu_common/cpu.c @@ -2414,27 +2414,31 @@ void cpu_RDMSR() EAX = tsc & 0xffffffff; EDX = tsc >> 32; break; - case 0x2a: + case 0x2A: + EAX = 0xC4000000; + EDX = 0; if (cpu_dmulti == 3) - EAX = ((0 << 25) | (0 << 24) | (0 << 23) | (1 << 22)); + EAX |= ((0 << 25) | (0 << 24) | (0 << 23) | (1 << 22)); else if (cpu_dmulti == 3.5) - EAX = ((0 << 25) | (1 << 24) | (0 << 23) | (1 << 22)); + EAX |= ((0 << 25) | (1 << 24) | (0 << 23) | (1 << 22)); else if (cpu_dmulti == 4) - EAX = ((0 << 25) | (0 << 24) | (1 << 23) | (0 << 22)); + EAX |= ((0 << 25) | (0 << 24) | (1 << 23) | (0 << 22)); else if (cpu_dmulti == 4.5) - EAX = ((0 << 25) | (1 << 24) | (1 << 23) | (0 << 22)); + EAX |= ((0 << 25) | (1 << 24) | (1 << 23) | (0 << 22)); else if (cpu_dmulti == 5) - EAX = 0; + EAX |= 0; else if (cpu_dmulti == 5.5) - EAX = ((0 << 25) | (1 << 24) | (0 << 23) | (0 << 22)); + EAX |= ((0 << 25) | (1 << 24) | (0 << 23) | (0 << 22)); else if (cpu_dmulti == 6) - EAX = ((1 << 25) | (0 << 24) | (1 << 23) | (1 << 22)); + EAX |= ((1 << 25) | (0 << 24) | (1 << 23) | (1 << 22)); else if (cpu_dmulti == 6.5) - EAX = ((1 << 25) | (1 << 24) | (1 << 23) | (1 << 22)); + EAX |= ((1 << 25) | (1 << 24) | (1 << 23) | (1 << 22)); else if (cpu_dmulti == 7) - EAX = ((1 << 25) | (0 << 24) | (0 << 23) | (1 << 22)); + EAX |= ((1 << 25) | (0 << 24) | (0 << 23) | (1 << 22)); else - EAX = ((0 << 25) | (0 << 24) | (0 << 23) | (1 << 22)); + EAX |= ((0 << 25) | (0 << 24) | (0 << 23) | (1 << 22)); + if (cpu_busspeed >= 84000000) + EAX |= (1 << 19); break; case 0x1107: EAX = msr.fcr; @@ -2740,8 +2744,38 @@ void cpu_RDMSR() /* pclog("APIC_BASE read : %08X%08X\n", EDX, EAX); */ break; case 0x2A: - EAX = 0xC5800000; - EDX = 0; + EAX = 0xC4000000; + EDX = 0; + if (cpu_dmulti == 2.5) + EAX |= ((0 << 25) | (1 << 24) | (1 << 23) | (1 << 22)); + else if (cpu_dmulti == 3) + EAX |= ((0 << 25) | (0 << 24) | (0 << 23) | (1 << 22)); + else if (cpu_dmulti == 3.5) + EAX |= ((0 << 25) | (1 << 24) | (0 << 23) | (1 << 22)); + else if (cpu_dmulti == 4) + EAX |= ((0 << 25) | (0 << 24) | (1 << 23) | (0 << 22)); + else if (cpu_dmulti == 4.5) + EAX |= ((0 << 25) | (1 << 24) | (1 << 23) | (0 << 22)); + else if (cpu_dmulti == 5) + EAX |= 0; + else if (cpu_dmulti == 5.5) + EAX |= ((0 << 25) | (1 << 24) | (0 << 23) | (0 << 22)); + else if (cpu_dmulti == 6) + EAX |= ((1 << 25) | (0 << 24) | (1 << 23) | (1 << 22)); + else if (cpu_dmulti == 6.5) + EAX |= ((1 << 25) | (1 << 24) | (1 << 23) | (1 << 22)); + else if (cpu_dmulti == 7) + EAX |= ((1 << 25) | (0 << 24) | (0 << 23) | (1 << 22)); + else if (cpu_dmulti == 7.5) + EAX |= ((1 << 25) | (1 << 24) | (0 << 23) | (1 << 22)); + else if (cpu_dmulti == 8) + EAX |= ((1 << 25) | (0 << 24) | (1 << 23) | (0 << 22)); + else + EAX |= ((0 << 25) | (1 << 24) | (1 << 23) | (1 << 22)); + if (machines[machine].cpu[cpu_manufacturer].cpus[cpu].cpu_type != CPU_PENTIUMPRO) { + if (cpu_busspeed >= 84000000) + EAX |= (1 << 19); + } break; case 0x79: EAX = ecx79_msr & 0xffffffff; @@ -3150,8 +3184,8 @@ void cpu_WRMSR() tsc = EAX | ((uint64_t)EDX << 32); break; case 0x8B: - cpu_log("WRMSR: Invalid MSR: 0x8B/n"); /*Needed for Vista to correctly break on Pentium*/ - x86gpf(NULL, 0); + cpu_log("WRMSR: Invalid MSR: 0x8B\n"); + x86gpf(NULL, 0); /*Needed for Vista to correctly break on Pentium*/ break; } break; From bad0eb323af190248a7d4d134e4a4054f2f0c530 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 31 May 2020 05:37:52 +0200 Subject: [PATCH 23/35] Made the ACPI GPIO registers initialize to 0xFF instead of 0x00, fixes the ABit BF6, removed the 6BXC, and added the A-Trend ATC6310BXII. --- src/acpi.c | 2 ++ src/include/86box/machine.h | 4 +-- src/machine/m_at_slot1.c | 65 ++++++++++++++++++------------------- src/machine/machine_table.c | 10 +++--- 4 files changed, 39 insertions(+), 42 deletions(-) diff --git a/src/acpi.c b/src/acpi.c index a1eb5f260..629b00b5f 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -832,6 +832,8 @@ acpi_init(const device_t *info) timer_add(&dev->timer, acpi_timer_count, dev, 0); timer_set_delay_u64(&dev->timer, ACPICONST); + dev->regs.gpireg[0] = dev->regs.gpireg[1] = dev->regs.gpireg[2] = 0xff; + return dev; } diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 09ebce0c8..45fc1af6c 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -336,12 +336,10 @@ extern int machine_at_p65up5_cp6nd_init(const machine_t *); extern int machine_at_p65up5_cpknd_init(const machine_t *); extern int machine_at_kn97_init(const machine_t *); -#if defined(DEV_BRANCH) && defined(NO_SIO) -extern int machine_at_6bxc_init(const machine_t *); -#endif extern int machine_at_p2bls_init(const machine_t *); extern int machine_at_p3bf_init(const machine_t *); extern int machine_at_bf6_init(const machine_t *); +extern int machine_at_atc6310bxii_init(const machine_t *); #if defined(DEV_BRANCH) && defined(NO_SIO) extern int machine_at_tsunamiatx_init(const machine_t *); #endif diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 167b91609..7d8edc955 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -108,39 +108,6 @@ machine_at_kn97_init(const machine_t *model) return ret; } -#if defined(DEV_BRANCH) && defined(NO_SIO) -int -machine_at_6bxc_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear(L"roms/machines/6bxc/powleap.bin", - 0x000c0000, 262144, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); - pci_register_slot(0x01, PCI_CARD_NORMAL, 1, 2, 3, 4); - device_add(&i440bx_device); - device_add(&piix4e_device); - device_add(&keyboard_ps2_pci_device); - device_add(&um8669f_device); /*ITE 8671*/ - device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0x7, 256); - - return ret; -} -#endif - int machine_at_p2bls_init(const machine_t *model) { @@ -291,6 +258,38 @@ machine_at_bf6_init(const machine_t *model) return ret; } +int +machine_at_atc6310bxii_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear(L"roms/machines/atc6310bxii/6310s102.bin", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0E, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x01, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add(&i440bx_device); + device_add(&slc90e66_device); + device_add(&keyboard_ps2_pci_device); + device_add(&w83977ef_device); + device_add(&sst_flash_39sf020_device); + spd_register(SPD_TYPE_SDRAM, 0xF, 256); + + return ret; +} + int machine_at_p6sba_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 0cf27d2ae..b5598b194 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -296,25 +296,23 @@ const machine_t machines[] = { /* 440LX */ /* 440BX */ -#if defined(DEV_BRANCH) && defined(NO_SIO) - { "[Slot 1 BX] Gigabyte GA-6BXC", "6bxc", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_6bxc_init, NULL }, -#endif { "[Slot 1 BX] ASUS P2B-LS", "p2bls", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_p2bls_init, NULL }, { "[Slot 1 BX] ASUS P3B-F", "p3bf", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_p3bf_init, NULL }, { "[Slot 1 BX] ABit BF6", "bf6", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_bf6_init, NULL }, + { "[Slot 1 BX] A-Trend ATC6310BXII", "atc6310bxii", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_atc6310bxii_init, NULL }, #if defined(DEV_BRANCH) && defined(NO_SIO) { "[Slot 1 BX] Tyan Tsunami ATX", "tsunamiatx", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_SOUND, 8, 1024, 8, 255, machine_at_tsunamiatx_init, at_tsunamiatx_get_device }, #endif { "[Slot 1 BX] Supermicro P6SBA", "p6sba", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_p6sba_init, NULL }, - /* Slot 2 machines */ - /* 440GX */ + /* Slot 2 machines */ + /* 440GX */ #if defined(DEV_BRANCH) && defined(NO_SIO) { "[Slot 2 GX] Supermicro S2DGE", "s2dge", {{"Intel", cpus_Xeon}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_s2dge_init, NULL }, #endif /* PGA370 machines */ - /* 440LX */ + /* 440LX */ #if defined(DEV_BRANCH) && defined(NO_SIO) { "[Socket 370 LX] Supermicro 370SLM", "s370slm", {{"Intel", cpus_Celeron}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_s370slm_init, NULL }, #endif From 285b01679bad84ba4071c93826238301a26ca6d5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 31 May 2020 07:17:16 +0200 Subject: [PATCH 24/35] Changed the ATC6310BXII SPD init to 0x7 because the board only has 3 RAM slots. --- src/machine/m_at_slot1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 7d8edc955..2fdc1c065 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -285,7 +285,7 @@ machine_at_atc6310bxii_init(const machine_t *model) device_add(&keyboard_ps2_pci_device); device_add(&w83977ef_device); device_add(&sst_flash_39sf020_device); - spd_register(SPD_TYPE_SDRAM, 0xF, 256); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); return ret; } From 9fb12c323e7b8584504bd61b0ace7f201fdbb291 Mon Sep 17 00:00:00 2001 From: Shaojun Li Date: Thu, 4 Jun 2020 14:26:45 +0800 Subject: [PATCH 25/35] Disable IME on East Asian localized Windows operating systems. --- src/win/win_ui.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/win/win_ui.c b/src/win/win_ui.c index c4b1271e9..1dfc57527 100644 --- a/src/win/win_ui.c +++ b/src/win/win_ui.c @@ -1307,4 +1307,5 @@ plat_set_input(HWND h) input_orig_proc = GetWindowLongPtr(h, GWLP_WNDPROC); input_orig_hwnd = h; SetWindowLongPtr(h, GWLP_WNDPROC, (LONG_PTR)&input_proc); + ImmAssociateContext(h, NULL); } From 3f0adb5211a9be8e3c4faf46d2e46beccb9b43ca Mon Sep 17 00:00:00 2001 From: nerd73 Date: Fri, 5 Jun 2020 10:22:59 -0600 Subject: [PATCH 26/35] Add the AMI Excalibur, a VLB OPTi 596/597 machine. Also adds emulation of the OPTi 5x7 chipset, and introduces a clock divider for VLB on 64-bit bus systems. --- src/chipset/opti5x7.c | 126 +++++++++++++++++++++++++++++++++++ src/cpu_common/cpu.c | 15 +++-- src/cpu_common/cpu.h | 7 +- src/cpu_common/cpu_table.c | 4 +- src/include/86box/chipset.h | 1 + src/include/86box/machine.h | 2 + src/machine/m_at_socket4_5.c | 20 ++++++ src/machine/machine_table.c | 3 + src/pit.c | 6 +- src/video/vid_et4000w32.c | 2 +- src/win/Makefile.mingw | 2 +- src/win/Makefile_ndr.mingw | 2 +- 12 files changed, 175 insertions(+), 15 deletions(-) create mode 100644 src/chipset/opti5x7.c diff --git a/src/chipset/opti5x7.c b/src/chipset/opti5x7.c new file mode 100644 index 000000000..e725e67eb --- /dev/null +++ b/src/chipset/opti5x7.c @@ -0,0 +1,126 @@ +/*Based off the OPTI 82C546/82C547 datasheet. +The earlier 596/597 appears to be register compatible with the 546/547 from testing.*/ +#include +#include +#include +#include +#include +#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/keyboard.h> +#include <86box/mem.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/port_92.h> +#include <86box/chipset.h> + + +typedef struct +{ + uint8_t cur_reg, + regs[64]; + port_92_t *port_92; +} opti5x7_t; + +static void +opti5x7_recalcmapping(opti5x7_t *dev) +{ + uint32_t shflags = 0; + + shadowbios = 0; + shadowbios_write = 0; + + + shadowbios |= !!(dev->regs[0x06] & 0x05); + shadowbios_write |= !!(dev->regs[0x06] & 0x0a); + + shflags = (dev->regs[0x06] & 0x01) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; + shflags |= (dev->regs[0x06] & 0x02) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY; + mem_set_mem_state(0xe0000, 0x10000, shflags); + + shflags = (dev->regs[0x06] & 0x04) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; + shflags |= (dev->regs[0x06] & 0x08) ? MEM_WRITE_INTERNAL : MEM_WRITE_EXTANY; + mem_set_mem_state(0xf0000, 0x10000, shflags); + + flushmmucache(); +} +static void +opti5x7_write(uint16_t addr, uint8_t val, void *priv) +{ + opti5x7_t *dev = (opti5x7_t *) priv; +// pclog("Write %02x to OPTi 5x7 address %02x\n", val, addr); + + switch (addr) { + case 0x22: + dev->cur_reg = val; + break; + case 0x24: + dev->regs[dev->cur_reg] = val; + if (dev->cur_reg == 0x02) { + cpu_cache_ext_enabled = val & 0x10; + cpu_update_waitstates(); + } + if (dev->cur_reg == 0x06) { + opti5x7_recalcmapping(dev); + } + break; + } +} + + +static uint8_t +opti5x7_read(uint16_t addr, void *priv) +{ + uint8_t ret = 0xff; + opti5x7_t *dev = (opti5x7_t *) priv; + + switch (addr) { + case 0x24: +// pclog("Read from OPTI 5x7 register %02x\n", dev->cur_reg); + ret = dev->regs[dev->cur_reg]; + break; + } + + return ret; +} + + +static void +opti5x7_close(void *priv) +{ + opti5x7_t *dev = (opti5x7_t *) priv; + + free(dev); +} + + +static void * +opti5x7_init(const device_t *info) +{ + opti5x7_t *dev = (opti5x7_t *) malloc(sizeof(opti5x7_t)); + memset(dev, 0, sizeof(opti5x7_t)); + + 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); + + dev->port_92 = device_add(&port_92_device); +// pclog("OPTi 5x7 init\n"); + opti5x7_recalcmapping(dev); + + + return dev; +} + +const device_t opti5x7_device = { + "OPTi 82C5x6/82C5x7", + 0, + 0, + opti5x7_init, opti5x7_close, NULL, + NULL, NULL, NULL, + NULL +}; diff --git a/src/cpu_common/cpu.c b/src/cpu_common/cpu.c index 8a10948ac..c9b122dbe 100644 --- a/src/cpu_common/cpu.c +++ b/src/cpu_common/cpu.c @@ -141,7 +141,7 @@ CPU *cpu_s; int cpu_effective; int cpu_multi; double cpu_dmulti; -int cpu_16bitbus; +int cpu_16bitbus, cpu_64bitbus; int cpu_busspeed; int cpu_cyrix_alignment; int CPUID; @@ -309,7 +309,7 @@ cpu_set(void) isdx4 = (cpu_s->cpu_type >= CPU_iDX4) && (cpu_s->cpu_type < CPU_WINCHIP); is_am486 = (cpu_s->cpu_type == CPU_Am486SX) || (cpu_s->cpu_type == CPU_Am486SX2) || (cpu_s->cpu_type == CPU_Am486DX) || (cpu_s->cpu_type == CPU_Am486DX2) || (cpu_s->cpu_type == CPU_Am486DX4) || (cpu_s->cpu_type == CPU_Am5x86); - is_pentium = (cpu_s->cpu_type == CPU_PENTIUM) || (cpu_s->cpu_type == CPU_PENTIUMMMX); + is_pentium = (cpu_s->cpu_type == CPU_P24T) || (cpu_s->cpu_type == CPU_PENTIUM) || (cpu_s->cpu_type == CPU_PENTIUMMMX); /* Not Pentiums, but they share the same SMM save state table layout. */ is_pentium |= (cpu_s->cpu_type == CPU_i486DX2) || (cpu_s->cpu_type == CPU_iDX4); /* The WinChip datasheet claims these are Pentium-compatible. */ @@ -335,7 +335,8 @@ cpu_set(void) #endif cpu_16bitbus = (cpu_s->cpu_type == CPU_286 || cpu_s->cpu_type == CPU_386SX || cpu_s->cpu_type == CPU_486SLC || cpu_s->cpu_type == CPU_IBM386SLC || cpu_s->cpu_type == CPU_IBM486SLC ); - + cpu_64bitbus = (cpu_s->cpu_type >= CPU_WINCHIP); + if (cpu_s->multi) cpu_busspeed = cpu_s->rspeed / cpu_s->multi; else @@ -995,6 +996,7 @@ cpu_set(void) #endif break; + case CPU_P24T: case CPU_PENTIUM: #ifdef USE_DYNAREC x86_setopcodes(ops_386, ops_pentium_0f, dynarec_ops_386, dynarec_ops_pentium_0f); @@ -1787,7 +1789,8 @@ cpu_CPUID(void) break; } break; - + + case CPU_P24T: case CPU_PENTIUM: if (!EAX) { @@ -2697,6 +2700,7 @@ void cpu_RDMSR() } break; + case CPU_P24T: case CPU_PENTIUM: case CPU_PENTIUMMMX: EAX = EDX = 0; @@ -3175,7 +3179,8 @@ void cpu_WRMSR() break; } break; - + + case CPU_P24T: case CPU_PENTIUM: case CPU_PENTIUMMMX: switch (ECX) diff --git a/src/cpu_common/cpu.h b/src/cpu_common/cpu.h index e617f4e6d..3db00d1eb 100644 --- a/src/cpu_common/cpu.h +++ b/src/cpu_common/cpu.h @@ -52,6 +52,7 @@ enum { CPU_Cx486DX4, CPU_Am5x86, CPU_Cx5x86, + CPU_P24T, CPU_WINCHIP, /* 586 class CPUs */ CPU_WINCHIP2, CPU_PENTIUM, @@ -370,7 +371,7 @@ COMPILE_TIME_ASSERT(sizeof(cpu_state) <= 128) /* Global variables. */ extern int cpu_iscyrix; -extern int cpu_16bitbus; +extern int cpu_16bitbus, cpu_64bitbus; extern int cpu_busspeed, cpu_pci_speed; extern int cpu_multi; extern double cpu_dmulti; @@ -379,8 +380,8 @@ extern int cpu_cyrix_alignment; /*Cyrix 5x86/6x86 only has data misalignment extern int is8086, is286, is386, is486, is486sx, is486dx, is486sx2, is486dx2, isdx4; extern int is_am486, is_pentium, is_k5, is_k6, is_p6; -extern int hascache; -extern int isibm486; +extern int hascache; +extern int isibm486; extern int is_rapidcad; extern int hasfpu; #define CPU_FEATURE_RDTSC (1 << 0) diff --git a/src/cpu_common/cpu_table.c b/src/cpu_common/cpu_table.c index 5d8ec3457..41cea5233 100644 --- a/src/cpu_common/cpu_table.c +++ b/src/cpu_common/cpu_table.c @@ -288,8 +288,8 @@ CPU cpus_i486[] = { {"iDX4/100", CPU_iDX4, 100000000, 3.0, 0x483, 0x483, 0x0000, CPU_SUPPORTS_DYNAREC, 18,18, 9, 9, 12}, /*Is on some real Intel DX2s, limit here is pretty arbitary*/ {"iDX4 OverDrive 75", CPU_iDX4, 75000000, 3.0, 0x1480, 0x1480, 0x0000, CPU_SUPPORTS_DYNAREC, 12,12, 9, 9, 9}, {"iDX4 OverDrive 100", CPU_iDX4, 100000000, 3.0, 0x1480, 0x1480, 0x0000, CPU_SUPPORTS_DYNAREC, 18,18, 9, 9, 12}, - {"Pentium OverDrive 63", CPU_PENTIUM, 62500000, 2.5, 0x1531, 0x1531, 0x0000, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 10,10,7,7, 15/2}, - {"Pentium OverDrive 83", CPU_PENTIUM, 83333333, 2.5, 0x1532, 0x1532, 0x0000, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 15,15,8,8, 10}, + {"Pentium OverDrive 63", CPU_P24T, 62500000, 2.5, 0x1531, 0x1531, 0x0000, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 10,10,7,7, 15/2}, + {"Pentium OverDrive 83", CPU_P24T, 83333333, 2.5, 0x1532, 0x1532, 0x0000, CPU_SUPPORTS_DYNAREC | CPU_REQUIRES_DYNAREC, 15,15,8,8, 10}, {"", -1, 0, 0, 0, 0, 0x0000, 0, 0, 0, 0, 0, 0} }; diff --git a/src/include/86box/chipset.h b/src/include/86box/chipset.h index ff92068fc..8ee9a3d54 100644 --- a/src/include/86box/chipset.h +++ b/src/include/86box/chipset.h @@ -47,6 +47,7 @@ extern const device_t i440zx_device; /* OPTi */ extern const device_t opti495_device; +extern const device_t opti5x7_device; /* C&T */ extern const device_t neat_device; diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 45fc1af6c..5e85906ed 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -253,6 +253,8 @@ extern const device_t *at_cpqiii_get_device(void); #endif /* m_at_socket4_5.c */ +extern int machine_at_excalibur_init(const machine_t *); + extern int machine_at_batman_init(const machine_t *); extern int machine_at_ambradp60_init(const machine_t *); #if defined(DEV_BRANCH) && defined(USE_VPP60) diff --git a/src/machine/m_at_socket4_5.c b/src/machine/m_at_socket4_5.c index 59e237567..0567a5d1a 100644 --- a/src/machine/m_at_socket4_5.c +++ b/src/machine/m_at_socket4_5.c @@ -41,6 +41,26 @@ #include <86box/sio.h> #include <86box/video.h> #include <86box/machine.h> +int +machine_at_excalibur_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear_inverted(L"roms/machines/excalibur/S75P.ROM", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + + device_add(&ide_vlb_device); + device_add(&opti5x7_device); + device_add(&fdc37c663_device); + device_add(&keyboard_at_ami_device); + + return ret; +} static void diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index b5598b194..84c619b43 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -206,6 +206,9 @@ const machine_t machines[] = { { "[486 PCI] Zida Tomato 4DP", "4dps", {{"Intel", cpus_i486}, {"AMD", cpus_Am486}, {"Cyrix", cpus_Cx486}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 255, 1, 127, machine_at_4dps_init, NULL }, /* Socket 4 machines */ + /* OPTi 596/597 */ + { "[Socket 4 OPTi] AMI Excalibur VLB", "excalibur", {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_VLB | MACHINE_AT | MACHINE_HDC, 1, 64, 1, 127, machine_at_excalibur_init, NULL }, + /* 430LX */ { "[Socket 4 LX] IBM Ambra DP60 PCI", "ambradp60", {{"Intel", cpus_Pentium5V}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 2, 128, 2, 127, machine_at_ambradp60_init, NULL }, #if defined(DEV_BRANCH) && defined(USE_VPP60) diff --git a/src/pit.c b/src/pit.c index 61d18e317..7c6c1923d 100644 --- a/src/pit.c +++ b/src/pit.c @@ -1029,8 +1029,10 @@ pit_set_clock(int clock) TIMER_USEC = (uint64_t)((cpuclock / 1000000.0) * (double)(1ull << 32)); isa_timing = (cpuclock / (double)8000000.0); - - bus_timing = (cpuclock / (double)cpu_busspeed); + if (cpu_64bitbus) + bus_timing = (cpuclock / ((double)cpu_busspeed) / 2); + else + bus_timing = (cpuclock / (double)cpu_busspeed); pci_timing = (cpuclock / (double)cpu_pci_speed); /* PCICLK in us for use with timer_on_auto(). */ diff --git a/src/video/vid_et4000w32.c b/src/video/vid_et4000w32.c index cf6d61fdc..1568eb008 100644 --- a/src/video/vid_et4000w32.c +++ b/src/video/vid_et4000w32.c @@ -1210,7 +1210,7 @@ uint8_t et4000w32p_pci_read(int func, int addr, void *p) case 0x09: return 0; /*Programming interface*/ case 0x0a: return 0x00; /*Supports VGA interface, XGA compatible*/ - case 0x0b: return is_pentium ? 0x03 : 0x00; /* This has to be done in order to make this card work with the two 486 PCI machines. */ + case 0x0b: return cpu_64bitbus ? 0x03 : 0x00; /* This has to be done in order to make this card work with the two 486 PCI machines. */ case 0x10: return 0x00; /*Linear frame buffer address*/ case 0x11: return 0x00; diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 9e2ad81d9..e761fc091 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -515,7 +515,7 @@ CPUOBJ := cpu.o cpu_table.o \ $(DYNARECOBJ) CHIPSETOBJ := acc2168.o acer_m3a.o cs8230.o ali1429.o headland.o \ - intel_4x0.o neat.o opti495.o scamp.o scat.o \ + intel_4x0.o neat.o opti495.o opti5x7.o scamp.o scat.o \ sis_85c471.o sis_85c496.o \ via_apollo.o via_vpx.o wd76c10.o diff --git a/src/win/Makefile_ndr.mingw b/src/win/Makefile_ndr.mingw index 29ff11093..03ae92185 100644 --- a/src/win/Makefile_ndr.mingw +++ b/src/win/Makefile_ndr.mingw @@ -519,7 +519,7 @@ CPUOBJ := cpu.o cpu_table.o \ $(DYNARECOBJ) CHIPSETOBJ := acc2168.o acer_m3a.o cs8230.o ali1429.o headland.o \ - intel_4x0.o neat.o opti495.o scamp.o scat.o \ + intel_4x0.o neat.o opti495.o opti5x7.o scamp.o scat.o \ sis_85c471.o sis_85c496.o \ via_apollo.o via_vpx.o wd76c10.o From 51572530ff470162c8597b1fc53ca8cf483f30b6 Mon Sep 17 00:00:00 2001 From: nerd73 Date: Fri, 5 Jun 2020 10:28:03 -0600 Subject: [PATCH 27/35] Remove waitstates from register 02. --- src/chipset/opti5x7.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/chipset/opti5x7.c b/src/chipset/opti5x7.c index e725e67eb..4a83ed98d 100644 --- a/src/chipset/opti5x7.c +++ b/src/chipset/opti5x7.c @@ -63,7 +63,6 @@ opti5x7_write(uint16_t addr, uint8_t val, void *priv) dev->regs[dev->cur_reg] = val; if (dev->cur_reg == 0x02) { cpu_cache_ext_enabled = val & 0x10; - cpu_update_waitstates(); } if (dev->cur_reg == 0x06) { opti5x7_recalcmapping(dev); From b04908f2a1d4510ba91b58aaae565d04cec9e4f0 Mon Sep 17 00:00:00 2001 From: tiseno100 <58827426+tiseno100@users.noreply.github.com> Date: Fri, 5 Jun 2020 19:30:39 +0300 Subject: [PATCH 28/35] 440LX implementation --- src/chipset/intel_4x0.c | 122 ++++++++++++++++++++++++++++++----- src/include/86box/chipset.h | 1 + src/include/86box/machine.h | 3 +- src/machine/m_at_socket370.c | 4 +- src/machine/machine_table.c | 3 +- 5 files changed, 111 insertions(+), 22 deletions(-) diff --git a/src/chipset/intel_4x0.c b/src/chipset/intel_4x0.c index 14cfa55f3..b06319e11 100644 --- a/src/chipset/intel_4x0.c +++ b/src/chipset/intel_4x0.c @@ -43,6 +43,7 @@ enum INTEL_430VX, INTEL_430TX, INTEL_440FX, + INTEL_440LX, INTEL_440BX, INTEL_440ZX }; @@ -94,7 +95,7 @@ i4x0_smram_handler_phase0(i4x0_t *dev) /* Disable any active mappings. */ if (dev->type >= INTEL_430FX) { - if (dev->type >= INTEL_440BX) { + if (dev->type >= INTEL_440LX) { /* Disable high extended SMRAM. */ /* TODO: This area should point to A0000-FFFFF. */ for (i = 0x100a0000; i < 0x100fffff; i += MEM_GRANULARITY_SIZE) { @@ -257,7 +258,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) regs[0x04] = (regs[0x04] & ~0x42) | (val & 0x42); break; case INTEL_430FX: case INTEL_430FX_PB640: case INTEL_430HX: case INTEL_430VX: case INTEL_430TX: - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: regs[0x04] = (regs[0x04] & ~0x02) | (val & 0x02); break; } @@ -265,7 +266,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x05: switch (dev->type) { case INTEL_420TX: case INTEL_420ZX: case INTEL_430LX: case INTEL_430NX: case INTEL_430HX: - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: case INTEL_440BX: case INTEL_440ZX: regs[0x05] = (regs[0x05] & ~0x01) | (val & 0x01); break; @@ -278,6 +279,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) regs[0x07] &= ~(val & 0x70); break; case INTEL_430FX: case INTEL_430FX_PB640: case INTEL_430VX: case INTEL_430TX: + case INTEL_440LX: regs[0x07] &= ~(val & 0x30); break; case INTEL_440FX: @@ -331,6 +333,14 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) break; } break; + + case 0x34: + switch (dev->type) { + case INTEL_440LX: + regs[0x34] = (val & 0xa0); + } + break; + case 0x4f: switch (dev->type) { case INTEL_430HX: @@ -365,6 +375,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440FX: regs[0x50] = (val & 0xf4); break; + case INTEL_440LX: + regs[0x50] = (val & 0x03); + break; case INTEL_440BX: regs[0x50] = (regs[0x50] & 0x14) | (val & 0xeb); break; @@ -382,6 +395,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440FX: regs[0x51] = (val & 0xc3); break; + case INTEL_440LX: + regs[0x51] = (val & 0x80); + break; case INTEL_440BX: case INTEL_440ZX: regs[0x51] = (regs[0x50] & 0x70) | (val & 0x8f); break; @@ -400,6 +416,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440FX: regs[0x52] = val; break; + case INTEL_440LX: + regs[0x52] = (val & 0xd0); + break; case INTEL_440BX: case INTEL_440ZX: regs[0x52] = val & 0x07; break; @@ -417,6 +436,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430VX: case INTEL_430TX: regs[0x53] = val & 0x3f; break; + case INTEL_440LX: + regs[0x53] = val & 0x0a; + break; case INTEL_440BX: /* Not applicable to 440ZX as that does not support ECC. */ regs[0x53] = val; @@ -438,6 +460,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440FX: regs[0x54] = val & 0x82; break; + case INTEL_440LX: + regs[0x54] = val; + break; } break; case 0x55: @@ -445,7 +470,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430VX: case INTEL_430TX: regs[0x55] = val & 0x01; break; - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: regs[0x55] = val; break; } @@ -461,7 +486,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430TX: regs[0x56] = val & 0x76; break; - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: regs[0x56] = val; break; } @@ -485,6 +510,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440FX: regs[0x57] = val & 0x77; break; + case INTEL_440LX: + regs[0x57] = val & 0x11; + break; case INTEL_440BX: regs[0x57] = val & 0x3f; break; @@ -499,7 +527,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430LX: default: regs[0x58] = val & 0x01; break; - case INTEL_430NX: + case INTEL_430NX: case INTEL_440LX: case INTEL_440BX: case INTEL_440ZX: regs[0x58] = val & 0x03; break; @@ -576,7 +604,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_420TX: case INTEL_420ZX: case INTEL_430LX: case INTEL_430NX: case INTEL_430HX: - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: case INTEL_440BX: case INTEL_440ZX: default: regs[addr] = val; @@ -595,7 +623,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_420TX: case INTEL_420ZX: case INTEL_430LX: case INTEL_430NX: case INTEL_430HX: - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: case INTEL_440BX: case INTEL_440ZX: regs[addr] = val; break; @@ -610,7 +638,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x66: switch (dev->type) { case INTEL_430NX: case INTEL_430HX: - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: case INTEL_440BX: case INTEL_440ZX: regs[addr] = val; break; @@ -619,7 +647,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x67: switch (dev->type) { case INTEL_430NX: case INTEL_430HX: - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: case INTEL_440BX: case INTEL_440ZX: regs[addr] = val; break; @@ -640,7 +668,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430FX: case INTEL_430FX_PB640: regs[0x68] = val & 0x1f; break; - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: regs[0x68] = val & 0xc0; break; case INTEL_440BX: @@ -668,6 +696,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x6a: case 0x6b: switch (dev->type) { case INTEL_430NX: + case INTEL_440LX: case INTEL_440BX: regs[addr] = val; break; @@ -681,6 +710,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) break; case 0x6c: case 0x6d: case 0x6e: switch (dev->type) { + case INTEL_440LX: case INTEL_440BX: regs[addr] = val; break; @@ -692,6 +722,13 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) break; } break; + case 0x6f: + switch (dev->type){ + case INTEL_440LX: + regs[addr] = val; + break; + } + break; case 0x70: switch (dev->type) { case INTEL_420TX: case INTEL_420ZX: @@ -704,7 +741,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430VX: case INTEL_430TX: regs[addr] = val & 0xfc; break; - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: regs[addr] = val & 0xf8; break; } @@ -718,7 +755,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430TX: regs[addr] = val; break; - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: regs[addr] = val & 0x1f; break; } @@ -853,6 +890,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440FX: regs[0x80] = val & 0x1b; break; + case INTEL_440LX: + regs[0x80] = val & 0x08; + break; case INTEL_440BX: case INTEL_440ZX: regs[0x7c] = val; break; @@ -861,7 +901,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x91: switch (dev->type) { case INTEL_430HX: case INTEL_440BX: - case INTEL_440FX: + case INTEL_440FX: case INTEL_440LX: /* Not applicable on 82443ZX. */ regs[0x91] &= ~(val & 0x11); break; @@ -869,6 +909,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) break; case 0x92: switch (dev->type) { + case INTEL_440LX: case INTEL_440BX: case INTEL_440ZX: regs[0x92] &= ~(val & 0x1f); break; @@ -877,6 +918,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x93: switch (dev->type) { case INTEL_440FX: + case INTEL_440LX: regs[0x93] = (val & 0x0f); trc_write(0x0093, val & 0x06, NULL); break; @@ -1097,7 +1139,7 @@ i4x0_reset(void *priv) else i4x0_write(0, 0x72, 0x00, priv); - if ((dev->type == INTEL_440BX) || (dev->type == INTEL_440ZX)) { + if ((dev->type == INTEL_440LX) || (dev->type == INTEL_440BX) || (dev->type == INTEL_440ZX)) { for (i = 0; i <= dev->max_func; i++) memset(dev->regs_locked[i], 0x00, 256 * sizeof(uint8_t)); } @@ -1268,6 +1310,28 @@ static void regs[0x71] = 0x10; regs[0x72] = 0x02; break; + case INTEL_440LX: + dev->max_func = 1; + + regs[0x02] = 0x80; regs[0x03] = 0x71; /* 82443LX */ + regs[0x06] = 0x90; + regs[0x10] = 0x08; + regs[0x34] = 0xa0; + if (cpu_busspeed <= 66666667) + regs[0x51] |= 0x00; + else if ((cpu_busspeed > 66666667) && (cpu_busspeed <= 100000000)) + regs[0x51] |= 0x20; + regs[0x53] = 0x83; + regs[0x57] = 0x28; + regs[0x60] = regs[0x61] = regs[0x62] = regs[0x63] = regs[0x64] = regs[0x65] = regs[0x66] = regs[0x67] = 0x01; + regs[0x6c] = regs[0x6d] = regs[0x6e] = regs[0x6f] = 0x55; + regs[0x72] = 0x02; + regs[0xa0] = 0x02; + regs[0xa2] = 0x10; + regs[0xa4] = 0x03; + regs[0xa5] = 0x02; + regs[0xa7] = 0x1f; + break; case INTEL_440BX: case INTEL_440ZX: regs[0x7a] = (info->local >> 8) & 0xff; dev->max_func = (regs[0x7a] & 0x02) ? 0 : 1; @@ -1313,6 +1377,20 @@ static void i4x0_write(regs[0x5f], 0x5f, 0x00, dev); i4x0_write(regs[0x72], 0x72, 0x00, dev); + if ((dev->type == INTEL_440LX) && (dev->max_func == 1)) { + regs = (uint8_t *) dev->regs[1]; + + regs[0x00] = 0x86; regs[0x01] = 0x80; /* Intel */ + regs[0x02] = 0x81; regs[0x03] = 0x71; /* 82443LX */ + regs[0x06] = 0xa0; regs[0x07] = 0x02; + regs[0x0a] = 0x04; regs[0x0b] = 0x06; + regs[0x0e] = 0x01; + regs[0x1c] = 0xf0; + regs[0x1e] = 0xa0; regs[0x1f] = 0x02; + regs[0x20] = 0xf0; regs[0x21] = 0xff; + regs[0x24] = 0xf0; regs[0x25] = 0xff; + } + if (((dev->type == INTEL_440BX) || (dev->type == INTEL_440ZX)) && (dev->max_func == 1)) { regs = (uint8_t *) dev->regs[1]; @@ -1484,6 +1562,20 @@ const device_t i440fx_device = NULL }; +const device_t i440lx_device = +{ + "Intel 82443LX", + DEVICE_PCI, + INTEL_440LX, + i4x0_init, + i4x0_close, + i4x0_reset, + NULL, + NULL, + NULL, + NULL +}; + const device_t i440bx_device = { diff --git a/src/include/86box/chipset.h b/src/include/86box/chipset.h index ff92068fc..564203587 100644 --- a/src/include/86box/chipset.h +++ b/src/include/86box/chipset.h @@ -42,6 +42,7 @@ extern const device_t i430hx_device; extern const device_t i430vx_device; extern const device_t i430tx_device; extern const device_t i440fx_device; +extern const device_t i440lx_device; extern const device_t i440bx_device; extern const device_t i440zx_device; diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 45fc1af6c..86a6b294c 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -357,9 +357,8 @@ extern int machine_at_s2dge_init(const machine_t *); #endif /* m_at_socket370.c */ -#if defined(DEV_BRANCH) && defined(NO_SIO) extern int machine_at_s370slm_init(const machine_t *); -#endif + extern int machine_at_cubx_init(const machine_t *); extern int machine_at_atc7020bxii_init(const machine_t *); extern int machine_at_63a_init(const machine_t *); diff --git a/src/machine/m_at_socket370.c b/src/machine/m_at_socket370.c index 8852ee804..c730a1af6 100644 --- a/src/machine/m_at_socket370.c +++ b/src/machine/m_at_socket370.c @@ -41,7 +41,6 @@ #include "cpu.h" #include <86box/machine.h> -#if defined(DEV_BRANCH) && defined(NO_SIO) int machine_at_s370slm_init(const machine_t *model) { @@ -65,7 +64,7 @@ machine_at_s370slm_init(const machine_t *model) pci_register_slot(0x0E, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x01, PCI_CARD_NORMAL, 1, 2, 3, 4); pci_register_slot(0x0D, PCI_CARD_NORMAL, 1, 2, 3, 4); - device_add(&i440bx_device); /*i440LX*/ + device_add(&i440lx_device); device_add(&piix4e_device); device_add(&w83977tf_device); device_add(&keyboard_ps2_ami_pci_device); @@ -96,7 +95,6 @@ machine_at_s370slm_init(const machine_t *model) return ret; } -#endif int machine_at_cubx_init(const machine_t *model) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index b5598b194..e0b56c03a 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -313,9 +313,8 @@ const machine_t machines[] = { /* PGA370 machines */ /* 440LX */ -#if defined(DEV_BRANCH) && defined(NO_SIO) { "[Socket 370 LX] Supermicro 370SLM", "s370slm", {{"Intel", cpus_Celeron}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 768, 8, 255, machine_at_s370slm_init, NULL }, -#endif + /* 440BX */ { "[Socket 370 BX] ASUS CUBX", "cubx", {{"Intel", cpus_Celeron}, {"VIA", cpus_Cyrix3}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_cubx_init, NULL }, { "[Socket 370 BX] A-Trend ATC7020BXII", "atc7020bxii", {{"Intel", cpus_Celeron}, {"VIA", cpus_Cyrix3}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_atc7020bxii_init, NULL }, From 45b2d16c6bba328fd6a29c6d1eccacbc897c5be5 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 5 Jun 2020 19:55:33 +0200 Subject: [PATCH 29/35] ACPI reset now correctly sets the GPIREG registers back to 0xFF after zeroing all registers (which are the default values), fixes soft reset on the Abit BF6. --- src/acpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/acpi.c b/src/acpi.c index 629b00b5f..17c9fe40b 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -787,6 +787,7 @@ acpi_reset(void *priv) int i; memset(&dev->regs, 0x00, sizeof(acpi_regs_t)); + dev->regs.gpireg[0] = dev->regs.gpireg[1] = dev->regs.gpireg[2] = 0xff; for (i = 0; i < 4; i++) dev->regs.gporeg[i] = dev->gporeg_default[i]; } From 0af3f90c8f5a0784532b36834801f1ed5ce41aa3 Mon Sep 17 00:00:00 2001 From: tiseno100 <58827426+tiseno100@users.noreply.github.com> Date: Fri, 5 Jun 2020 23:12:36 +0300 Subject: [PATCH 30/35] Added the 440EX --- src/chipset/intel_4x0.c | 110 ++++++++++++++++++++++++++++++---- src/include/86box/chipset.h | 1 + src/include/86box/machine.h | 5 +- src/machine/m_at_slot1.c | 53 ++++++++++++++++ src/machine/m_at_socket7_s7.c | 30 ---------- src/machine/machine_table.c | 6 +- 6 files changed, 156 insertions(+), 49 deletions(-) diff --git a/src/chipset/intel_4x0.c b/src/chipset/intel_4x0.c index b06319e11..aee40c3e5 100644 --- a/src/chipset/intel_4x0.c +++ b/src/chipset/intel_4x0.c @@ -44,6 +44,7 @@ enum INTEL_430TX, INTEL_440FX, INTEL_440LX, + INTEL_440EX, INTEL_440BX, INTEL_440ZX }; @@ -258,7 +259,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) regs[0x04] = (regs[0x04] & ~0x42) | (val & 0x42); break; case INTEL_430FX: case INTEL_430FX_PB640: case INTEL_430HX: case INTEL_430VX: case INTEL_430TX: - case INTEL_440FX: case INTEL_440LX: + case INTEL_440FX: case INTEL_440LX: case INTEL_440EX: regs[0x04] = (regs[0x04] & ~0x02) | (val & 0x02); break; } @@ -266,7 +267,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x05: switch (dev->type) { case INTEL_420TX: case INTEL_420ZX: case INTEL_430LX: case INTEL_430NX: case INTEL_430HX: - case INTEL_440FX: case INTEL_440LX: + case INTEL_440FX: case INTEL_440LX: case INTEL_440EX: case INTEL_440BX: case INTEL_440ZX: regs[0x05] = (regs[0x05] & ~0x01) | (val & 0x01); break; @@ -279,7 +280,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) regs[0x07] &= ~(val & 0x70); break; case INTEL_430FX: case INTEL_430FX_PB640: case INTEL_430VX: case INTEL_430TX: - case INTEL_440LX: + case INTEL_440LX: case INTEL_440EX: regs[0x07] &= ~(val & 0x30); break; case INTEL_440FX: @@ -336,7 +337,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x34: switch (dev->type) { - case INTEL_440LX: + case INTEL_440LX: case INTEL_440EX: regs[0x34] = (val & 0xa0); } break; @@ -378,6 +379,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440LX: regs[0x50] = (val & 0x03); break; + case INTEL_440EX: + regs[0x50] = (val & 0x23); + break; case INTEL_440BX: regs[0x50] = (regs[0x50] & 0x14) | (val & 0xeb); break; @@ -395,7 +399,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440FX: regs[0x51] = (val & 0xc3); break; - case INTEL_440LX: + case INTEL_440LX: case INTEL_440EX: regs[0x51] = (val & 0x80); break; case INTEL_440BX: case INTEL_440ZX: @@ -439,7 +443,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440LX: regs[0x53] = val & 0x0a; break; - case INTEL_440BX: + case INTEL_440EX: case INTEL_440BX: /* Not applicable to 440ZX as that does not support ECC. */ regs[0x53] = val; break; @@ -471,6 +475,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) regs[0x55] = val & 0x01; break; case INTEL_440FX: case INTEL_440LX: + case INTEL_440EX: regs[0x55] = val; break; } @@ -487,6 +492,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) regs[0x56] = val & 0x76; break; case INTEL_440FX: case INTEL_440LX: + case INTEL_440EX: regs[0x56] = val; break; } @@ -497,7 +503,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430LX: default: regs[0x57] = val & 0x3f; break; - case INTEL_430NX: + case INTEL_430NX: case INTEL_440EX: regs[0x57] = val; break; case INTEL_430FX: case INTEL_430FX_PB640: @@ -541,6 +547,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430TX: regs[0x57] = val & 0x7b; break; + case INTEL_440EX: + regs[0x58] = val & 0xbf; + break; } break; case 0x59: /* PAM0 */ @@ -604,7 +613,8 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_420TX: case INTEL_420ZX: case INTEL_430LX: case INTEL_430NX: case INTEL_430HX: - case INTEL_440FX: case INTEL_440LX: + case INTEL_440FX: + case INTEL_440LX: case INTEL_440EX: case INTEL_440BX: case INTEL_440ZX: default: regs[addr] = val; @@ -623,7 +633,8 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_420TX: case INTEL_420ZX: case INTEL_430LX: case INTEL_430NX: case INTEL_430HX: - case INTEL_440FX: case INTEL_440LX: + case INTEL_440FX: + case INTEL_440LX: case INTEL_440EX: case INTEL_440BX: case INTEL_440ZX: regs[addr] = val; break; @@ -639,6 +650,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) switch (dev->type) { case INTEL_430NX: case INTEL_430HX: case INTEL_440FX: case INTEL_440LX: + case INTEL_440EX: case INTEL_440BX: case INTEL_440ZX: regs[addr] = val; break; @@ -648,6 +660,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) switch (dev->type) { case INTEL_430NX: case INTEL_430HX: case INTEL_440FX: case INTEL_440LX: + case INTEL_440EX: case INTEL_440BX: case INTEL_440ZX: regs[addr] = val; break; @@ -669,6 +682,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) regs[0x68] = val & 0x1f; break; case INTEL_440FX: case INTEL_440LX: + case INTEL_440EX: regs[0x68] = val & 0xc0; break; case INTEL_440BX: @@ -697,6 +711,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) switch (dev->type) { case INTEL_430NX: case INTEL_440LX: + case INTEL_440EX: case INTEL_440BX: regs[addr] = val; break; @@ -711,6 +726,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x6c: case 0x6d: case 0x6e: switch (dev->type) { case INTEL_440LX: + case INTEL_440EX: case INTEL_440BX: regs[addr] = val; break; @@ -725,6 +741,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case 0x6f: switch (dev->type){ case INTEL_440LX: + case INTEL_440EX: regs[addr] = val; break; } @@ -742,6 +759,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) regs[addr] = val & 0xfc; break; case INTEL_440FX: case INTEL_440LX: + case INTEL_440EX: regs[addr] = val & 0xf8; break; } @@ -752,7 +770,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_430LX: regs[addr] = val & 0x4d; break; - case INTEL_430TX: + case INTEL_430TX: case INTEL_440EX: regs[addr] = val; break; case INTEL_440FX: case INTEL_440LX: @@ -893,6 +911,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) case INTEL_440LX: regs[0x80] = val & 0x08; break; + case INTEL_440EX: + regs[0x80] = val & 0x18; + break; case INTEL_440BX: case INTEL_440ZX: regs[0x7c] = val; break; @@ -902,6 +923,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) switch (dev->type) { case INTEL_430HX: case INTEL_440BX: case INTEL_440FX: case INTEL_440LX: + case INTEL_440EX: /* Not applicable on 82443ZX. */ regs[0x91] &= ~(val & 0x11); break; @@ -909,7 +931,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) break; case 0x92: switch (dev->type) { - case INTEL_440LX: + case INTEL_440LX: case INTEL_440EX: case INTEL_440BX: case INTEL_440ZX: regs[0x92] &= ~(val & 0x1f); break; @@ -919,6 +941,7 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) switch (dev->type) { case INTEL_440FX: case INTEL_440LX: + case INTEL_440EX: regs[0x93] = (val & 0x0f); trc_write(0x0093, val & 0x06, NULL); break; @@ -940,6 +963,9 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) break; case 0xb1: switch (dev->type) { + case INTEL_440EX: + regs[0xb1] = (val & 0x22); + break; case INTEL_440BX: case INTEL_440ZX: regs[0xb1] = (val & 0xa0); break; @@ -960,7 +986,31 @@ i4x0_write(int func, int addr, uint8_t val, void *priv) break; } break; + case 0xba: case 0xbb: + switch (dev->type) { + case INTEL_440BX: case INTEL_440ZX: + regs[addr] = val; + break; + } + break; + + case 0xbc: + switch (dev->type) { + case INTEL_440EX: + regs[addr] = (val & 0xf8); + break; + } + break; + + case 0xbd: + switch (dev->type) { + case INTEL_440EX: + regs[addr] = (val & 0xf8); + break; + } + break; + case 0xd0: case 0xd1: case 0xd2: case 0xd3: case 0xd4: case 0xd5: case 0xd6: case 0xd7: switch (dev->type) { case INTEL_440BX: case INTEL_440ZX: @@ -1332,6 +1382,28 @@ static void regs[0xa5] = 0x02; regs[0xa7] = 0x1f; break; + case INTEL_440EX: + dev->max_func = 1; + + regs[0x02] = 0x80; regs[0x03] = 0x71; /* 82443EX. Same Vendor ID as 440LX*/ + regs[0x06] = 0x90; + regs[0x10] = 0x08; + regs[0x34] = 0xa0; + if (cpu_busspeed <= 66666667) + regs[0x51] |= 0x00; + else if ((cpu_busspeed > 66666667) && (cpu_busspeed <= 100000000)) + regs[0x51] |= 0x20; + regs[0x53] = 0x83; + regs[0x57] = 0x28; + regs[0x60] = regs[0x61] = regs[0x62] = regs[0x63] = regs[0x64] = regs[0x65] = regs[0x66] = regs[0x67] = 0x01; + regs[0x6c] = regs[0x6d] = regs[0x6e] = regs[0x6f] = 0x55; + regs[0x72] = 0x02; + regs[0xa0] = 0x02; + regs[0xa2] = 0x10; + regs[0xa4] = 0x03; + regs[0xa5] = 0x02; + regs[0xa7] = 0x1f; + break; case INTEL_440BX: case INTEL_440ZX: regs[0x7a] = (info->local >> 8) & 0xff; dev->max_func = (regs[0x7a] & 0x02) ? 0 : 1; @@ -1377,7 +1449,7 @@ static void i4x0_write(regs[0x5f], 0x5f, 0x00, dev); i4x0_write(regs[0x72], 0x72, 0x00, dev); - if ((dev->type == INTEL_440LX) && (dev->max_func == 1)) { + if (((dev->type == INTEL_440LX) || (dev->type == INTEL_440EX)) && (dev->max_func == 1)) { regs = (uint8_t *) dev->regs[1]; regs[0x00] = 0x86; regs[0x01] = 0x80; /* Intel */ @@ -1576,6 +1648,20 @@ const device_t i440lx_device = NULL }; +const device_t i440ex_device = +{ + "Intel 82443EX", + DEVICE_PCI, + INTEL_440EX, + i4x0_init, + i4x0_close, + i4x0_reset, + NULL, + NULL, + NULL, + NULL +}; + const device_t i440bx_device = { diff --git a/src/include/86box/chipset.h b/src/include/86box/chipset.h index 918f52287..5c840bd08 100644 --- a/src/include/86box/chipset.h +++ b/src/include/86box/chipset.h @@ -43,6 +43,7 @@ extern const device_t i430vx_device; extern const device_t i430tx_device; extern const device_t i440fx_device; extern const device_t i440lx_device; +extern const device_t i440ex_device; extern const device_t i440bx_device; extern const device_t i440zx_device; diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index b61583abc..22c140427 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -312,9 +312,6 @@ extern int machine_at_p5mms98_init(const machine_t *); extern int machine_at_ficva502_init(const machine_t *); extern int machine_at_ficpa2012_init(const machine_t *); -#if defined(DEV_BRANCH) && defined(NO_SIO) -extern int machine_at_advanceii_init(const machine_t *); -#endif #ifdef EMU_DEVICE_H extern const device_t *at_pb640_get_device(void); @@ -338,6 +335,8 @@ extern int machine_at_p65up5_cp6nd_init(const machine_t *); extern int machine_at_p65up5_cpknd_init(const machine_t *); extern int machine_at_kn97_init(const machine_t *); +extern int machine_at_p6i440e2_init(const machine_t *); + extern int machine_at_p2bls_init(const machine_t *); extern int machine_at_p3bf_init(const machine_t *); extern int machine_at_bf6_init(const machine_t *); diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index 2fdc1c065..d61e6eb50 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -108,6 +108,59 @@ machine_at_kn97_init(const machine_t *model) return ret; } +int +machine_at_p6i440e2_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear(L"roms/machines/p6i440e2/E2_v14sl.bin", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init_ex(model, 2); + + pci_init(PCI_CONFIG_TYPE_1); + pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0A, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x01, PCI_CARD_NORMAL, 1, 2, 3, 4); + device_add(&i440ex_device); + device_add(&piix4_device); + device_add(&keyboard_ps2_pci_device); + device_add(&w83977tf_device); + device_add(&sst_flash_29ee010_device); + spd_register(SPD_TYPE_SDRAM, 0x03, 256); + + hwm_values_t machine_hwm = { + { /* fan speeds */ + 3000, /* Chassis */ + 3000, /* CPU */ + 3000 /* Power */ + }, { /* temperatures */ + 30, /* MB */ + 0, /* unused */ + 27 /* CPU */ + }, { /* voltages */ + 2050, /* VCORE (2.05V by default) */ + 0, /* unused */ + 3300, /* +3.3V */ + RESISTOR_DIVIDER(5000, 11, 16), /* +5V (divider values bruteforced) */ + RESISTOR_DIVIDER(12000, 28, 10), /* +12V (28K/10K divider suggested in the W83781D datasheet) */ + RESISTOR_DIVIDER(12000, 853, 347), /* -12V (divider values bruteforced) */ + RESISTOR_DIVIDER(5000, 1, 2) /* -5V (divider values bruteforced) */ + } + }; + if (model->cpu[cpu_manufacturer].cpus[cpu_effective].cpu_type == CPU_PENTIUM2) + machine_hwm.voltages[0] = 2800; /* set higher VCORE (2.8V) for Klamath */ + hwm_set_values(machine_hwm); + device_add(&w83781d_device); + + return ret; +} + int machine_at_p2bls_init(const machine_t *model) { diff --git a/src/machine/m_at_socket7_s7.c b/src/machine/m_at_socket7_s7.c index a53216e1f..0b93b7b20 100644 --- a/src/machine/m_at_socket7_s7.c +++ b/src/machine/m_at_socket7_s7.c @@ -968,33 +968,3 @@ machine_at_ficpa2012_init(const machine_t *model) return ret; } - -#if defined(DEV_BRANCH) && defined(NO_SIO) -int -machine_at_advanceii_init(const machine_t *model) -{ - int ret; - - ret = bios_load_linear(L"roms/machines/advanceii/VP3_V27.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - - machine_at_common_init_ex(model, 2); - - pci_init(PCI_CONFIG_TYPE_1); - pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); - pci_register_slot(0x08, PCI_CARD_NORMAL, 1, 2, 3, 4); - pci_register_slot(0x09, PCI_CARD_NORMAL, 2, 3, 4, 1); - pci_register_slot(0x0A, PCI_CARD_NORMAL, 3, 4, 1, 2); - pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); - device_add(&via_vp3_device); - device_add(&via_vt82c586b_device); - device_add(&keyboard_ps2_pci_device); - device_add(&um8669f_device); //IT8661F - device_add(&sst_flash_39sf010_device); - - return ret; -} -#endif \ No newline at end of file diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index e84f788d1..9a6804566 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -273,9 +273,6 @@ const machine_t machines[] = { /* Apollo VP3 */ { "[Socket 7 VP3] FIC PA-2012", "ficpa2012", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 192, 8, 127, machine_at_ficpa2012_init, NULL }, -#if defined(DEV_BRANCH) && defined(NO_SIO) - { "[Socket 7 VP3] QDI Advance II", "advanceii", MACHINE_CPUS_PENTIUM_S7, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 128, 8, 127, machine_at_advanceii_init, NULL }, -#endif /* Super Socket 7 machines */ /* Apollo MVP3 */ @@ -296,7 +293,8 @@ const machine_t machines[] = { { "[Slot 1 FX] ASUS P/I-P65UP5 (C-PKND)", "p65up5_cpknd", {{"Intel", cpus_PentiumII66}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 127, machine_at_p65up5_cpknd_init, NULL }, { "[Slot 1 FX] ASUS KN97", "kn97", {{"Intel", cpus_PentiumII66}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 384, 8, 127, machine_at_kn97_init, NULL }, - /* 440LX */ + /* 440EX */ + { "[Slot 1 EX] QDI EXCELLENT II", "p6i440e2", {{"Intel", cpus_PentiumII66}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 512, 8, 255, machine_at_p6i440e2_init, NULL }, /* 440BX */ { "[Slot 1 BX] ASUS P2B-LS", "p2bls", {{"Intel", cpus_PentiumII}, {"Intel/PGA370", cpus_Celeron},{"VIA", cpus_Cyrix3},{"", NULL},{"", NULL}}, MACHINE_PCI | MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC, 8, 1024, 8, 255, machine_at_p2bls_init, NULL }, From ca3ef2bc5bcc5e36b75c30524f1e0edc075ffaac Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 6 Jun 2020 05:47:07 +0200 Subject: [PATCH 31/35] Fixed ACC2168 chipset shadow RAM state setting because it was completely wrong, fixes IDE problems (yes, really) on the AMI 386DX Clone. --- src/chipset/acc2168.c | 54 ++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/src/chipset/acc2168.c b/src/chipset/acc2168.c index c088018a8..11bca1cac 100644 --- a/src/chipset/acc2168.c +++ b/src/chipset/acc2168.c @@ -43,44 +43,30 @@ typedef struct acc2168_t } acc2168_t; +/* + Based on reverse engineering using the AMI 386DX Clone BIOS: + Bit 0 of register 02 controls shadowing of C0000-C7FFF (1 = enabled, 0 = disabled); + Bit 1 of register 02 controls shadowing of C8000-CFFFF (1 = enabled, 0 = disabled); + Bit 2 of register 02 controls shadowing of D0000-DFFFF (1 = enabled, 0 = disabled); + Bit 3 of register 02 controls shadowing of E0000-EFFFF (1 = enabled, 0 = disabled); + Bit 4 of register 02 controls shadowing of F0000-FFFFF (1 = enabled, 0 = disabled); + Bit 5 is most likely: 1 = shadow enabled, 0 = shadow disabled; + Bit 6 of register 02 controls shadow RAM cacheability (1 = cacheable, 0 = non-cacheable). +*/ + static void acc2168_shadow_recalc(acc2168_t *dev) { - if (dev->regs[0x02] & 8) { - switch (dev->regs[0x02] & 0x30) { - case 0x00: - mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTANY | MEM_WRITE_INTERNAL); - break; - case 0x10: - mem_set_mem_state(0xf0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL); - break; - case 0x20: - mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTANY | MEM_WRITE_EXTANY); - break; - case 0x30: - mem_set_mem_state(0xf0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_EXTANY); - break; - } - } else - mem_set_mem_state(0xf0000, 0x10000, MEM_READ_EXTANY | MEM_WRITE_EXTANY); + int state; - if (dev->regs[0x02] & 4) { - switch (dev->regs[0x02] & 0x30) { - case 0x00: - mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTANY | MEM_WRITE_INTERNAL); - break; - case 0x10: - mem_set_mem_state(0xe0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL); - break; - case 0x20: - mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTANY | MEM_WRITE_EXTANY); - break; - case 0x30: - mem_set_mem_state(0xe0000, 0x10000, MEM_READ_INTERNAL | MEM_WRITE_EXTANY); - break; - } - } else - mem_set_mem_state(0xe0000, 0x10000, MEM_READ_EXTANY | MEM_WRITE_EXTANY); + if (dev->regs[0x02] & 0x20) + state = (dev->regs[0x02] & 0x20) ? (MEM_READ_INTERNAL | MEM_WRITE_INTERNAL) : (MEM_READ_EXTANY | MEM_WRITE_EXTANY); + + mem_set_mem_state(0xc0000, 0x08000, (dev->regs[0x02] & 0x01) ? state : (MEM_READ_EXTANY | MEM_WRITE_EXTANY)); + mem_set_mem_state(0xc8000, 0x08000, (dev->regs[0x02] & 0x02) ? state : (MEM_READ_EXTANY | MEM_WRITE_EXTANY)); + mem_set_mem_state(0xd0000, 0x10000, (dev->regs[0x02] & 0x04) ? state : (MEM_READ_EXTANY | MEM_WRITE_EXTANY)); + mem_set_mem_state(0xe0000, 0x10000, (dev->regs[0x02] & 0x08) ? state : (MEM_READ_EXTANY | MEM_WRITE_EXTANY)); + mem_set_mem_state(0xf0000, 0x10000, (dev->regs[0x02] & 0x10) ? state : (MEM_READ_EXTANY | MEM_WRITE_EXTANY)); } From 53ffc9ae7264964d0737395aacfe20ab106b98cb Mon Sep 17 00:00:00 2001 From: tiseno100 <58827426+tiseno100@users.noreply.github.com> Date: Sat, 6 Jun 2020 07:46:59 +0300 Subject: [PATCH 32/35] Added the SiS Rabbit Some high-end 386DX chipset --- src/include/86box/chipset.h | 1 + src/include/86box/machine.h | 1 + src/machine/m_at_386dx_486.c | 19 +++++++++++++++++++ src/machine/machine_table.c | 1 + src/win/Makefile.mingw | 2 +- src/win/Makefile_ndr.mingw | 2 +- 6 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/include/86box/chipset.h b/src/include/86box/chipset.h index 5c840bd08..ce78f0ec5 100644 --- a/src/include/86box/chipset.h +++ b/src/include/86box/chipset.h @@ -59,6 +59,7 @@ extern const device_t scat_sx_device; extern const device_t cs8230_device; /* SiS */ +extern const device_t rabbit_device; extern const device_t sis_85c471_device; extern const device_t sis_85c496_device; #if defined(DEV_BRANCH) && defined(USE_SIS_85C50X) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 22c140427..ae070407a 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -214,6 +214,7 @@ extern const device_t *at_commodore_sl386sx_get_device(void); /* m_at_386dx_486.c */ extern int machine_at_acc386_init(const machine_t *); +extern int machine_at_asus386_init(const machine_t *); extern int machine_at_ecs386_init(const machine_t *); extern int machine_at_micronics386_init(const machine_t *); diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 4bed55f9c..5f44c434b 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -63,6 +63,25 @@ machine_at_acc386_init(const machine_t *model) return ret; } +int +machine_at_asus386_init(const machine_t *model) +{ + int ret; + +ret = bios_load_linear(L"roms/machines/asus386/ASUS_ISA-386C_BIOS.bin", + 0x000f0000, 65536, 0); + + if (bios_only || !ret) + return ret; + + machine_at_common_init(model); + device_add(&rabbit_device); + device_add(&keyboard_at_ami_device); + device_add(&fdc_at_device); + + return ret; +} + int machine_at_ecs386_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 9a6804566..ad45224d9 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -160,6 +160,7 @@ const machine_t machines[] = { /* 386DX machines */ { "[386DX ISA] Compaq Portable III (386)", "portableiii386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC | MACHINE_VIDEO, 1, 14, 1, 127, machine_at_portableiii386_init, at_cpqiii_get_device }, { "[386DX ISA] AMI 386DX clone", "acc386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 16384, 128, 127, machine_at_acc386_init, NULL }, + { "[386DX ISA] ASUS 386DX ISA", "asus386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 16384, 128, 127, machine_at_asus386_init, NULL }, { "[386DX ISA] ECS 386/32", "ecs386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT, 1, 32, 1, 127, machine_at_ecs386_init, NULL }, { "[386DX ISA] Micronics 386 clone", "micronics386", {{"Intel", cpus_i386DX}, {"AMD", cpus_Am386DX}, {"Cyrix", cpus_486DLC}, {"", NULL}, {"", NULL}}, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 8192, 128, 127, machine_at_micronics386_init, NULL }, diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index e761fc091..9fbab1d51 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -516,7 +516,7 @@ CPUOBJ := cpu.o cpu_table.o \ CHIPSETOBJ := acc2168.o acer_m3a.o cs8230.o ali1429.o headland.o \ intel_4x0.o neat.o opti495.o opti5x7.o scamp.o scat.o \ - sis_85c471.o sis_85c496.o \ + rabbit.o sis_85c471.o sis_85c496.o \ via_apollo.o via_vpx.o wd76c10.o MCHOBJ := machine.o machine_table.o \ diff --git a/src/win/Makefile_ndr.mingw b/src/win/Makefile_ndr.mingw index 03ae92185..4b97efc26 100644 --- a/src/win/Makefile_ndr.mingw +++ b/src/win/Makefile_ndr.mingw @@ -520,7 +520,7 @@ CPUOBJ := cpu.o cpu_table.o \ CHIPSETOBJ := acc2168.o acer_m3a.o cs8230.o ali1429.o headland.o \ intel_4x0.o neat.o opti495.o opti5x7.o scamp.o scat.o \ - sis_85c471.o sis_85c496.o \ + rabbit.o sis_85c471.o sis_85c496.o \ via_apollo.o via_vpx.o wd76c10.o MCHOBJ := machine.o machine_table.o \ From 66c4ea194d814044875a78c8cb393d6fab27f53e Mon Sep 17 00:00:00 2001 From: tiseno100 <58827426+tiseno100@users.noreply.github.com> Date: Sat, 6 Jun 2020 07:50:11 +0300 Subject: [PATCH 33/35] Added the "fixed" Rabbit code --- src/chipset/rabbit.c | 119 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 src/chipset/rabbit.c diff --git a/src/chipset/rabbit.c b/src/chipset/rabbit.c new file mode 100644 index 000000000..3e637746e --- /dev/null +++ b/src/chipset/rabbit.c @@ -0,0 +1,119 @@ +#include +#include +#include +#include +#include +#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/keyboard.h> +#include <86box/mem.h> +#include <86box/fdd.h> +#include <86box/fdc.h> +#include <86box/chipset.h> + + +typedef struct +{ + uint8_t cur_reg, + regs[16]; +} rabbit_t; + +/* +static void +rabbit_recalcmapping(rabbit_t *dev) +{ + uint32_t base; + uint32_t i, shflags = 0; + + shadowbios = 0; + shadowbios_write = 0; + + for (i = 0; i < 8; i++) { + base = 0xc0000 + (i << 15); + + if (dev->regs[0x00] & 0x08) { + shadowbios |= (base >= 0xe0000) && (dev->regs[0x02] & 0x80); + shadowbios_write |= (base >= 0xe0000) && !(dev->regs[0x02] & 0x40); + shflags = (dev->regs[0x00] & 0x01) ? MEM_READ_INTERNAL : MEM_READ_EXTANY; + shflags |= (dev->regs[0x00] & 0x08) ? MEM_WRITE_EXTANY : MEM_WRITE_INTERNAL; + mem_set_mem_state(base, 0x8000, shflags); + } else + mem_set_mem_state(base, 0x8000, MEM_READ_EXTANY | MEM_WRITE_EXTERNAL); + } + + flushmmucache(); +} +*/ + +static void +rabbit_write(uint16_t addr, uint8_t val, void *priv) +{ + rabbit_t *dev = (rabbit_t *) priv; + + switch (addr) { + case 0x22: + dev->cur_reg = val; + break; + case 0x23: + dev->regs[dev->cur_reg] = val; + /* + if (dev->cur_reg == 0x00) { + rabbit_recalcmapping(dev); + } + */ + break; + } +} + + +static uint8_t +rabbit_read(uint16_t addr, void *priv) +{ + uint8_t ret = 0xff; + rabbit_t *dev = (rabbit_t *) priv; + + switch (addr) { + case 0x23: + ret = dev->regs[dev->cur_reg]; + break; + } + + return ret; +} + + +static void +rabbit_close(void *priv) +{ + rabbit_t *dev = (rabbit_t *) priv; + + free(dev); +} + + +static void * +rabbit_init(const device_t *info) +{ + rabbit_t *dev = (rabbit_t *) malloc(sizeof(rabbit_t)); + memset(dev, 0, sizeof(rabbit_t)); + + io_sethandler(0x0022, 0x0001, rabbit_read, NULL, NULL, rabbit_write, NULL, NULL, dev); + io_sethandler(0x0023, 0x0001, rabbit_read, NULL, NULL, rabbit_write, NULL, NULL, dev); + + return dev; +} + + +const device_t rabbit_device = { + "SiS Rabbit", + 0, + 0, + rabbit_init, rabbit_close, NULL, + NULL, NULL, NULL, + NULL +}; \ No newline at end of file From 2536c4c2cf977c9c572391e21006b53d65bea840 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 6 Jun 2020 18:02:24 +0200 Subject: [PATCH 34/35] Removed the ET4000AX RAM detection hack, the Kasang Korean card should now work again. --- src/video/vid_et4000.c | 50 ------------------------------------------ 1 file changed, 50 deletions(-) diff --git a/src/video/vid_et4000.c b/src/video/vid_et4000.c index e5aaac302..a86632094 100644 --- a/src/video/vid_et4000.c +++ b/src/video/vid_et4000.c @@ -277,56 +277,6 @@ et4000_out(uint16_t addr, uint8_t val, void *priv) svga_recalctimings(svga); } } - - /* - * Note - Silly hack to determine video memory - * size automatically by ET4000 BIOS. - */ - if ((svga->crtcreg == 0x37) && (dev->type != 1)) { - switch (val & 0x0b) { - case 0x00: - case 0x01: - if (svga->vram_max == 64 * 1024) - mem_mapping_enable(&svga->mapping); - else - mem_mapping_disable(&svga->mapping); - break; - - case 0x02: - if (svga->vram_max == 128 * 1024) - mem_mapping_enable(&svga->mapping); - else - mem_mapping_disable(&svga->mapping); - break; - - case 0x03: - case 0x08: - case 0x09: - if (svga->vram_max == 256 * 1024) - mem_mapping_enable(&svga->mapping); - else - mem_mapping_disable(&svga->mapping); - break; - - case 0x0a: - if (svga->vram_max == 512 * 1024) - mem_mapping_enable(&svga->mapping); - else - mem_mapping_disable(&svga->mapping); - break; - - case 0x0b: - if (svga->vram_max == 1024 * 1024) - mem_mapping_enable(&svga->mapping); - else - mem_mapping_disable(&svga->mapping); - break; - - default: - mem_mapping_enable(&svga->mapping); - break; - } - } break; } From 871c01f1531eaf55e1b4ec98264751d6238b58cc Mon Sep 17 00:00:00 2001 From: Altheos Date: Sat, 6 Jun 2020 21:35:03 +0200 Subject: [PATCH 35/35] Preliminary GUS MAX support --- src/sound/snd_ad1848.c | 39 ++++++++++++++----- src/sound/snd_gus.c | 80 ++++++++++++++++++++++++++++++++++++-- src/win/Makefile.mingw | 12 +++++- src/win/Makefile_ndr.mingw | 12 +++++- 4 files changed, 128 insertions(+), 15 deletions(-) diff --git a/src/sound/snd_ad1848.c b/src/sound/snd_ad1848.c index e3ed09981..d2edc6af8 100644 --- a/src/sound/snd_ad1848.c +++ b/src/sound/snd_ad1848.c @@ -1,6 +1,5 @@ -/*PCem v0.8 by Tom Walker - - AD1848 CODEC emulation (Windows Sound System compatible)*/ +/* + AD1848 / CS4248 / CS4231 CODEC emulation (Windows Sound System compatible)*/ #include #include @@ -14,6 +13,7 @@ #include <86box/sound.h> #include <86box/snd_ad1848.h> +#define CS4231 0x80 static int ad1848_vols_6bits[64]; static uint32_t ad1848_vols_5bits_aux_gain[32]; @@ -40,7 +40,11 @@ uint8_t ad1848_read(uint16_t addr, void *p) break; case 1: temp = ad1848->regs[ad1848->index]; - break; + if (ad1848->index == 0x0b) { + temp ^= 0x20; + ad1848->regs[ad1848->index] = temp; + } + break; case 2: temp = ad1848->status; break; @@ -97,6 +101,10 @@ void ad1848_write(uint16_t addr, uint8_t val, void *p) } break; + + case 11: + break; + case 12: if (ad1848->type != AD1848_TYPE_DEFAULT) ad1848->regs[12] = ((ad1848->regs[12] & 0x0f) + (val & 0xf0)) | 0x80; @@ -105,6 +113,14 @@ void ad1848_write(uint16_t addr, uint8_t val, void *p) case 14: ad1848->count = ad1848->regs[15] | (val << 8); break; + + case 24: + if (! (val & 0x70)) + ad1848->status &= 0xfe; + break; + + case 25: + break; } ad1848->regs[ad1848->index] = val; @@ -197,7 +213,7 @@ static void ad1848_poll(void *p) if (!(ad1848->status & 0x01)) { ad1848->status |= 0x01; - if (ad1848->regs[0xa] & 2) + if (ad1848->regs[10] & 2) picint(1 << ad1848->irq); } } @@ -221,9 +237,9 @@ void ad1848_init(ad1848_t *ad1848, int type) ad1848->mce = 0x40; ad1848->regs[0] = ad1848->regs[1] = 0; - ad1848->regs[2] = ad1848->regs[3] = 0x80; /* AZT2316A Line-in */ + ad1848->regs[2] = ad1848->regs[3] = 0x80; /* Line-in */ ad1848->regs[4] = ad1848->regs[5] = 0x80; - ad1848->regs[6] = ad1848->regs[7] = 0x80; /* AZT2316A Master? */ + ad1848->regs[6] = ad1848->regs[7] = 0x80; /* Left/right Output */ ad1848->regs[8] = 0; ad1848->regs[9] = 0x08; ad1848->regs[10] = ad1848->regs[11] = 0; @@ -236,8 +252,13 @@ void ad1848_init(ad1848_t *ad1848, int type) if (type == AD1848_TYPE_CS4231) { - ad1848->regs[0x12] = ad1848->regs[0x13] = 0x80; // AZT2316A CD - ad1848->regs[0x1A] = 0x80; // AZT2316A Mic + ad1848->regs[16] = ad1848->regs[17] = 0; + ad1848->regs[18] = ad1848->regs[19] = 0x88; + ad1848->regs[22] = 0x80; + ad1848->regs[24] = 0; + ad1848->regs[25] = CS4231; + ad1848->regs[26] = 0x80; + ad1848->regs[29] = 0x80; } ad1848->out_l = 0; diff --git a/src/sound/snd_gus.c b/src/sound/snd_gus.c index 9fa3bbdc2..19974cf6a 100644 --- a/src/sound/snd_gus.c +++ b/src/sound/snd_gus.c @@ -14,6 +14,8 @@ #include <86box/device.h> #include <86box/sound.h> #include <86box/midi.h> +#include <86Box/snd_ad1848.h> +#include enum { @@ -108,6 +110,12 @@ typedef struct gus_t uint16_t gp1_addr, gp2_addr; uint8_t usrr; + + uint8_t max_ctrl; + +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + ad1848_t ad1848; +#endif } gus_t; static int gus_gf1_irqs[8] = {-1, 2, 5, 3, 7, 11, 12, 15}; @@ -182,6 +190,9 @@ void writegus(uint16_t addr, uint8_t val, void *p) int c, d; int old; uint16_t port; +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + uint16_t csioport; +#endif if ((addr == 0x388) || (addr == 0x389)) port = addr; @@ -526,10 +537,16 @@ gus->curx[gus->voice]=(gus->curx[gus->voice]&0xFFF8000)|((val&0x7F)<<8); } else gus->irq_midi = gus_midi_irqs[(val >> 3) & 7]; +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + ad1848_setirq(&gus->ad1848, gus->irq); +#endif gus->sb_nmi = val & 0x80; } else { gus->dma = gus_dmas[val & 7]; +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + ad1848_setdma(&gus->ad1848, gus->dma); +#endif } break; case 1: @@ -584,6 +601,25 @@ gus->curx[gus->voice]=(gus->curx[gus->voice]&0xFFF8000)|((val&0x7F)<<8); case 0x20f: gus->reg_ctrl = val; break; + case 0x306: case 0x706: + if (gus->dma >= 4) + val |= 0x30; + gus->max_ctrl = (val >> 6) & 1; +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + if (val & 0x40) { + if ((val & 0xF) != ((addr >> 4) & 0xF)) { + csioport = 0x30c | ((addr >> 4) & 0xf); + io_removehandler(csioport, 4, + ad1848_read,NULL,NULL, + ad1848_write,NULL,NULL,&gus->ad1848); + csioport = 0x30c | ((val & 0xf) << 4); + io_sethandler(csioport, 4, + ad1848_read,NULL,NULL, + ad1848_write,NULL,NULL, &gus->ad1848); + } + } +#endif + break; } } @@ -632,7 +668,11 @@ uint8_t readgus(uint16_t addr, void *p) return val; case 0x20F: - return 0; + if (gus->max_ctrl) + val = 0x02; + else + val = 0x00; + break; case 0x302: return gus->voice; @@ -719,8 +759,14 @@ uint8_t readgus(uint16_t addr, void *p) break; } break; - case 0x306: case 0x706: /*Revision level*/ - return 0xff; /*Pre 3.7 - no mixer*/ + case 0x306: case 0x706: + if (gus->max_ctrl) + val = 0x0a; /* GUS MAX */ + else + val = 0xff; /*Pre 3.7 - no mixer*/ + break; + + break; case 0x307: /*DRAM access*/ val=gus->ram[gus->addr]; gus->addr&=0xFFFFF; @@ -1031,13 +1077,25 @@ static void gus_get_buffer(int32_t *buffer, int len, void *p) gus_t *gus = (gus_t *)p; int c; +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + if (gus->max_ctrl) + ad1848_update(&gus->ad1848); +#endif gus_update(gus); for (c = 0; c < len * 2; c++) { +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + if (gus->max_ctrl) + buffer[c] += (int32_t)(gus->ad1848.buffer[c] / 2); +#endif buffer[c] += (int32_t)gus->buffer[c & 1][c >> 1]; } +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + if (gus->max_ctrl) + gus->ad1848.pos = 0; +#endif gus->pos = 0; } @@ -1119,6 +1177,15 @@ void *gus_init(const device_t *info) io_sethandler(0x0100+gus->base, 0x0010, readgus, NULL, NULL, writegus, NULL, NULL, gus); io_sethandler(0x0506+gus->base, 0x0001, readgus, NULL, NULL, writegus, NULL, NULL, gus); io_sethandler(0x0388, 0x0002, readgus, NULL, NULL, writegus, NULL, NULL, gus); + +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + ad1848_init(&gus->ad1848, AD1848_TYPE_CS4231); + ad1848_setirq(&gus->ad1848, 5); + ad1848_setdma(&gus->ad1848, 3); + io_sethandler(0x10C+gus->base, 4, + ad1848_read,NULL,NULL, ad1848_write,NULL,NULL, &gus->ad1848); +#endif + timer_add(&gus->samp_timer, gus_poll_wave, gus, 1); timer_add(&gus->timer_1, gus_poll_timer_1, gus, 1); timer_add(&gus->timer_2, gus_poll_timer_2, gus, 1); @@ -1147,6 +1214,11 @@ void gus_speed_changed(void *p) gus->samp_latch = (uint64_t)(TIMER_USEC * (1000000.0 / 44100.0)); else gus->samp_latch = (uint64_t)(TIMER_USEC * (1000000.0 / gusfreqs[gus->voices - 14])); + +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) + if (gus->max_ctrl) + ad1848_speed_changed(&gus->ad1848); +#endif } static const device_config_t gus_config[] = { @@ -1156,7 +1228,7 @@ static const device_config_t gus_config[] = { { "Classic", GUS_CLASSIC }, -#if 0 +#if defined(DEV_BRANCH) && defined(USE_GUSMAX) { "MAX", GUS_MAX }, diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index e761fc091..eaea5af4f 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -8,7 +8,7 @@ # # Makefile for Win32 (MinGW32) environment. # -# Version: @(#)Makefile.mingw 1.0.143 2020/01/25 +# Version: @(#)Makefile.mingw 1.0.144 2020/06/06 # # Authors: Miran Grca, # Fred N. van Kempen, @@ -86,6 +86,9 @@ ifeq ($(DEV_BUILD), y) ifndef NO_SIO NO_SIO := y endif + ifndef GUSMAX + GUSMAX := y + endif else ifndef DEBUG DEBUG := n @@ -141,6 +144,9 @@ else ifndef NO_SIO NO_SIO := n endif + ifndef GUSMAX + GUSMAX := n + endif endif # Defaults for several build options (possibly defined in a chained file.) @@ -471,6 +477,10 @@ ifeq ($(NO_SIO), y) OPTS += -DNO_SIO endif +ifeq ($(GUSMAX), y) +OPTS += -DUSE_GUSMAX +endif + endif diff --git a/src/win/Makefile_ndr.mingw b/src/win/Makefile_ndr.mingw index 03ae92185..e9a82127d 100644 --- a/src/win/Makefile_ndr.mingw +++ b/src/win/Makefile_ndr.mingw @@ -8,7 +8,7 @@ # # Makefile for Win32 (MinGW32) environment. # -# Version: @(#)Makefile.mingw 1.0.142 2020/01/25 +# Version: @(#)Makefile.mingw 1.0.143 2020/06/06 # # Authors: Miran Grca, # Fred N. van Kempen, @@ -86,6 +86,9 @@ ifeq ($(DEV_BUILD), y) ifndef NO_SIO NO_SIO := y endif + ifndef GUSMAX + GUSMAX := y + endif else ifndef DEBUG DEBUG := n @@ -144,6 +147,9 @@ else ifndef NO_SIO NO_SIO := n endif + ifndef GUSMAX + GUSMAX := n + endif endif # Defaults for several build options (possibly defined in a chained file.) @@ -480,6 +486,10 @@ ifeq ($(NO_SIO), y) OPTS += -DNO_SIO endif +ifeq ($(GUSMAX), y) +OPTS += -DUSE_GUSMAX +endif + endif