mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 09:58:19 -07:00
Merge remote-tracking branch 'upstream/master' into feature/mtrr
This commit is contained in:
@@ -2280,6 +2280,12 @@ fdc_reset(void *priv)
|
||||
} else if (fdc->flags & FDC_FLAG_SEC) {
|
||||
fdc->dma = 1;
|
||||
fdc->specify[1] = 0;
|
||||
} else if (fdc->flags & FDC_FLAG_TER) {
|
||||
fdc->dma = 1;
|
||||
fdc->specify[1] = 0;
|
||||
} else if (fdc->flags & FDC_FLAG_QUA) {
|
||||
fdc->dma = 1;
|
||||
fdc->specify[1] = 0;
|
||||
} else {
|
||||
fdc->dma = 1;
|
||||
fdc->specify[1] = 0;
|
||||
@@ -2297,6 +2303,10 @@ fdc_reset(void *priv)
|
||||
fdc_remove(fdc);
|
||||
if (fdc->flags & FDC_FLAG_SEC) {
|
||||
fdc_set_base(fdc, FDC_SECONDARY_ADDR);
|
||||
} else if (fdc->flags & FDC_FLAG_TER) {
|
||||
fdc_set_base(fdc, FDC_TERTIARY_ADDR);
|
||||
} else if (fdc->flags & FDC_FLAG_QUA) {
|
||||
fdc_set_base(fdc, FDC_QUATERNARY_ADDR);
|
||||
} else {
|
||||
fdc_set_base(fdc, (fdc->flags & FDC_FLAG_PCJR) ? FDC_PRIMARY_PCJR_ADDR : FDC_PRIMARY_ADDR);
|
||||
}
|
||||
@@ -2330,6 +2340,10 @@ fdc_init(const device_t *info)
|
||||
|
||||
if (fdc->flags & FDC_FLAG_SEC)
|
||||
fdc->irq = FDC_SECONDARY_IRQ;
|
||||
else if (fdc->flags & FDC_FLAG_TER)
|
||||
fdc->irq = FDC_TERTIARY_IRQ;
|
||||
else if (fdc->flags & FDC_FLAG_QUA)
|
||||
fdc->irq = FDC_QUATERNARY_IRQ;
|
||||
else
|
||||
fdc->irq = FDC_PRIMARY_IRQ;
|
||||
|
||||
@@ -2337,6 +2351,10 @@ fdc_init(const device_t *info)
|
||||
timer_add(&fdc->watchdog_timer, fdc_watchdog_poll, fdc, 0);
|
||||
else if (fdc->flags & FDC_FLAG_SEC)
|
||||
fdc->dma_ch = FDC_SECONDARY_DMA;
|
||||
else if (fdc->flags & FDC_FLAG_TER)
|
||||
fdc->dma_ch = FDC_TERTIARY_DMA;
|
||||
else if (fdc->flags & FDC_FLAG_QUA)
|
||||
fdc->dma_ch = FDC_QUATERNARY_DMA;
|
||||
else
|
||||
fdc->dma_ch = FDC_PRIMARY_DMA;
|
||||
|
||||
@@ -2378,7 +2396,7 @@ const device_t fdc_xt_device = {
|
||||
|
||||
const device_t fdc_xt_sec_device = {
|
||||
.name = "PC/XT Floppy Drive Controller (Secondary)",
|
||||
.internal_name = "fdc_xt",
|
||||
.internal_name = "fdc_xt_sec",
|
||||
.flags = FDC_FLAG_SEC,
|
||||
.local = 0,
|
||||
.init = fdc_init,
|
||||
@@ -2390,6 +2408,34 @@ const device_t fdc_xt_sec_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t fdc_xt_ter_device = {
|
||||
.name = "PC/XT Floppy Drive Controller (Tertiary)",
|
||||
.internal_name = "fdc_xt_ter",
|
||||
.flags = FDC_FLAG_TER,
|
||||
.local = 0,
|
||||
.init = fdc_init,
|
||||
.close = fdc_close,
|
||||
.reset = fdc_reset,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t fdc_xt_qua_device = {
|
||||
.name = "PC/XT Floppy Drive Controller (Quaternary)",
|
||||
.internal_name = "fdc_xt_qua",
|
||||
.flags = FDC_FLAG_QUA,
|
||||
.local = 0,
|
||||
.init = fdc_init,
|
||||
.close = fdc_close,
|
||||
.reset = fdc_reset,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t fdc_xt_t1x00_device = {
|
||||
.name = "PC/XT Floppy Drive Controller (Toshiba)",
|
||||
.internal_name = "fdc_xt_t1x00",
|
||||
@@ -2474,6 +2520,34 @@ const device_t fdc_at_sec_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t fdc_at_ter_device = {
|
||||
.name = "PC/AT Floppy Drive Controller (Tertiary)",
|
||||
.internal_name = "fdc_at_ter",
|
||||
.flags = 0,
|
||||
.local = FDC_FLAG_AT | FDC_FLAG_TER,
|
||||
.init = fdc_init,
|
||||
.close = fdc_close,
|
||||
.reset = fdc_reset,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t fdc_at_qua_device = {
|
||||
.name = "PC/AT Floppy Drive Controller (Quaternary)",
|
||||
.internal_name = "fdc_at_qua",
|
||||
.flags = 0,
|
||||
.local = FDC_FLAG_AT | FDC_FLAG_QUA,
|
||||
.init = fdc_init,
|
||||
.close = fdc_close,
|
||||
.reset = fdc_reset,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t fdc_at_actlow_device = {
|
||||
.name = "PC/AT Floppy Drive Controller (Active low)",
|
||||
.internal_name = "fdc_at_actlow",
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
typedef struct
|
||||
{
|
||||
rom_t bios_rom;
|
||||
fdc_t *fdc_pri;
|
||||
fdc_t *fdc_sec;
|
||||
} monster_fdc_t;
|
||||
|
||||
static void
|
||||
@@ -57,14 +59,29 @@ monster_fdc_init(const device_t *info)
|
||||
dev = (monster_fdc_t *)malloc(sizeof(monster_fdc_t));
|
||||
memset(dev, 0, sizeof(monster_fdc_t));
|
||||
|
||||
#if 0
|
||||
uint8_t sec_irq = device_get_config_int("sec_irq");
|
||||
uint8_t sec_dma = device_get_config_int("sec_dma");
|
||||
#endif
|
||||
|
||||
if (BIOS_ADDR != 0)
|
||||
rom_init(&dev->bios_rom, ROM_MONSTER_FDC, BIOS_ADDR, 0x2000, 0x1ffff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
// Primary FDC
|
||||
device_add(&fdc_at_device);
|
||||
dev->fdc_pri = device_add(&fdc_at_device);
|
||||
|
||||
#if 0
|
||||
// Secondary FDC
|
||||
// device_add(&fdc_at_sec_device);
|
||||
uint8_t sec_enabled = device_get_config_int("sec_enabled");
|
||||
if (sec_enabled)
|
||||
dev->fdc_sec = device_add(&fdc_at_sec_device);
|
||||
fdc_set_irq(dev->fdc_sec, sec_irq);
|
||||
fdc_set_dma_ch(dev->fdc_sec, sec_dma);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
uint8_t rom_writes_enabled = device_get_config_int("rom_writes_enabled");
|
||||
#endif
|
||||
|
||||
return dev;
|
||||
}
|
||||
@@ -76,7 +93,14 @@ static int monster_fdc_available(void)
|
||||
|
||||
static const device_config_t monster_fdc_config[] = {
|
||||
// clang-format off
|
||||
/*
|
||||
#if 0
|
||||
{
|
||||
.name = "sec_enabled",
|
||||
.description = "Enable Secondary Controller",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_string = "",
|
||||
.default_int = 0
|
||||
},
|
||||
{
|
||||
.name = "sec_irq",
|
||||
.description = "Secondary Controller IRQ",
|
||||
@@ -137,7 +161,7 @@ static const device_config_t monster_fdc_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
*/
|
||||
#endif
|
||||
{
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS Address:",
|
||||
@@ -157,7 +181,7 @@ static const device_config_t monster_fdc_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
/*
|
||||
#if 0
|
||||
{
|
||||
.name = "bios_size",
|
||||
.description = "BIOS Size:",
|
||||
@@ -172,8 +196,14 @@ static const device_config_t monster_fdc_config[] = {
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
*/
|
||||
// BIOS extension ROM writes: Enabled/Disabled
|
||||
{
|
||||
.name = "rom_writes_enabled",
|
||||
.description = "Enable BIOS extension ROM Writes",
|
||||
.type = CONFIG_BINARY,
|
||||
.default_string = "",
|
||||
.default_int = 0
|
||||
},
|
||||
#endif
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
@@ -53,6 +53,8 @@ extern int fdc_type;
|
||||
#define FDC_FLAG_UMC 0x400 /* UMC UM8398 */
|
||||
#define FDC_FLAG_ALI 0x800 /* ALi M512x / M1543C */
|
||||
#define FDC_FLAG_SEC 0x1000 /* Is Secondary */
|
||||
#define FDC_FLAG_TER 0x2000 /* Is Tertiary */
|
||||
#define FDC_FLAG_QUA 0x3000 /* Is Quaternary */
|
||||
|
||||
typedef struct {
|
||||
uint8_t dor, stat, command, processed_cmd, dat, st0, swap, dtl;
|
||||
@@ -187,12 +189,16 @@ extern uint8_t fdc_get_current_drive(void);
|
||||
#ifdef EMU_DEVICE_H
|
||||
extern const device_t fdc_xt_device;
|
||||
extern const device_t fdc_xt_sec_device;
|
||||
extern const device_t fdc_xt_ter_device;
|
||||
extern const device_t fdc_xt_qua_device;
|
||||
extern const device_t fdc_xt_t1x00_device;
|
||||
extern const device_t fdc_xt_tandy_device;
|
||||
extern const device_t fdc_xt_amstrad_device;
|
||||
extern const device_t fdc_pcjr_device;
|
||||
extern const device_t fdc_at_device;
|
||||
extern const device_t fdc_at_sec_device;
|
||||
extern const device_t fdc_at_ter_device;
|
||||
extern const device_t fdc_at_qua_device;
|
||||
extern const device_t fdc_at_actlow_device;
|
||||
extern const device_t fdc_at_ps1_device;
|
||||
extern const device_t fdc_at_smc_device;
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
*
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
*
|
||||
* Copyright 2020 Miran Grca.
|
||||
* Copyright 2020 Miran Grca.
|
||||
* Copyright 2022-2023 Jasmine Iwanek.
|
||||
*/
|
||||
|
||||
#ifndef EMU_FLASH_H
|
||||
@@ -26,10 +28,36 @@ extern const device_t intel_flash_bxb_device;
|
||||
|
||||
extern const device_t sst_flash_29ee010_device;
|
||||
extern const device_t sst_flash_29ee020_device;
|
||||
|
||||
extern const device_t winbond_flash_w29c512_device;
|
||||
extern const device_t winbond_flash_w29c010_device;
|
||||
extern const device_t winbond_flash_w29c020_device;
|
||||
extern const device_t winbond_flash_w29c040_device;
|
||||
|
||||
extern const device_t sst_flash_39sf512_device;
|
||||
extern const device_t sst_flash_39sf010_device;
|
||||
extern const device_t sst_flash_39sf020_device;
|
||||
extern const device_t sst_flash_39sf040_device;
|
||||
|
||||
extern const device_t sst_flash_39lf512_device;
|
||||
extern const device_t sst_flash_39lf010_device;
|
||||
extern const device_t sst_flash_39lf020_device;
|
||||
extern const device_t sst_flash_39lf040_device;
|
||||
extern const device_t sst_flash_39lf080_device;
|
||||
extern const device_t sst_flash_39lf016_device;
|
||||
|
||||
extern const device_t sst_flash_49lf002_device;
|
||||
extern const device_t sst_flash_49lf020_device;
|
||||
extern const device_t sst_flash_49lf020a_device;
|
||||
extern const device_t sst_flash_49lf003_device;
|
||||
extern const device_t sst_flash_49lf030_device;
|
||||
extern const device_t sst_flash_49lf004_device;
|
||||
extern const device_t sst_flash_49lf004c_device;
|
||||
extern const device_t sst_flash_49lf040_device;
|
||||
extern const device_t sst_flash_49lf008_device;
|
||||
extern const device_t sst_flash_49lf008c_device;
|
||||
extern const device_t sst_flash_49lf080_device;
|
||||
extern const device_t sst_flash_49lf016_device;
|
||||
extern const device_t sst_flash_49lf160_device;
|
||||
|
||||
#endif /*EMU_FLASH_H*/
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#ifndef PLAT_DIR_H
|
||||
#define PLAT_DIR_H
|
||||
|
||||
/* Windows needs the POSIX re-implementations */
|
||||
#if defined(_WIN32)
|
||||
/* Windows and Termux needs the POSIX re-implementations */
|
||||
#if defined(_WIN32) || defined(__TERMUX__)
|
||||
# ifdef _MAX_FNAME
|
||||
# define MAXNAMLEN _MAX_FNAME
|
||||
# else
|
||||
|
||||
@@ -1,58 +1,60 @@
|
||||
/*
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
||||
* running old operating systems and software designed for IBM
|
||||
* PC systems and compatibles from 1981 through fairly recent
|
||||
* system designs based on the PCI bus.
|
||||
*
|
||||
* This file is part of the 86Box distribution.
|
||||
* This file is part of the 86Box distribution.
|
||||
*
|
||||
* Definitions for project version, branding, and external links.
|
||||
* Definitions for project version, branding, and external links.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2020 Miran Grca.
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2020 Miran Grca.
|
||||
*/
|
||||
|
||||
#define _LSTR(s) L ## s
|
||||
#define LSTR(s) _LSTR(s)
|
||||
|
||||
/* Version info. */
|
||||
#define EMU_NAME "@CMAKE_PROJECT_NAME@"
|
||||
#define EMU_NAME_W LSTR(EMU_NAME)
|
||||
#define EMU_NAME "@CMAKE_PROJECT_NAME@"
|
||||
#define EMU_NAME_W LSTR(EMU_NAME)
|
||||
|
||||
#define EMU_VERSION "@CMAKE_PROJECT_VERSION@"
|
||||
#define EMU_VERSION_W LSTR(EMU_VERSION)
|
||||
#define EMU_VERSION_EX "3.50" /* frozen due to IDE re-detection behavior on Windows */
|
||||
#define EMU_VERSION_MAJ @CMAKE_PROJECT_VERSION_MAJOR@
|
||||
#define EMU_VERSION_MIN @CMAKE_PROJECT_VERSION_MINOR@
|
||||
#define EMU_VERSION "@CMAKE_PROJECT_VERSION@"
|
||||
#define EMU_VERSION_W LSTR(EMU_VERSION)
|
||||
#define EMU_VERSION_EX "3.50" /* frozen due to IDE re-detection behavior on Windows */
|
||||
#define EMU_VERSION_MAJ @CMAKE_PROJECT_VERSION_MAJOR@
|
||||
#define EMU_VERSION_MIN @CMAKE_PROJECT_VERSION_MINOR@
|
||||
#define EMU_VERSION_PATCH @CMAKE_PROJECT_VERSION_PATCH@
|
||||
|
||||
#cmakedefine EMU_BUILD "@EMU_BUILD@"
|
||||
#define EMU_BUILD_NUM @EMU_BUILD_NUM@
|
||||
#cmakedefine EMU_GIT_HASH "@EMU_GIT_HASH@"
|
||||
#cmakedefine EMU_BUILD "@EMU_BUILD@"
|
||||
#define EMU_BUILD_NUM @EMU_BUILD_NUM@
|
||||
#cmakedefine EMU_GIT_HASH "@EMU_GIT_HASH@"
|
||||
|
||||
#ifdef EMU_BUILD
|
||||
# define EMU_BUILD_W LSTR(EMU_BUILD)
|
||||
# define EMU_VERSION_FULL EMU_VERSION " [" EMU_BUILD "]"
|
||||
# define EMU_VERSION_FULL_W EMU_VERSION_W L" [" EMU_BUILD_W L"]"
|
||||
# define EMU_BUILD_W LSTR(EMU_BUILD)
|
||||
# define EMU_VERSION_FULL EMU_VERSION " [" EMU_BUILD "]"
|
||||
# define EMU_VERSION_FULL_W EMU_VERSION_W L" [" EMU_BUILD_W L"]"
|
||||
#else
|
||||
# define EMU_VERSION_FULL EMU_VERSION
|
||||
# define EMU_VERSION_FULL_W EMU_VERSION_W
|
||||
# define EMU_VERSION_FULL EMU_VERSION
|
||||
# define EMU_VERSION_FULL_W EMU_VERSION_W
|
||||
#endif
|
||||
#ifdef EMU_GIT_HASH
|
||||
# define EMU_GIT_HASH_W LSTR(EMU_GIT_HASH)
|
||||
# define EMU_GIT_HASH_W LSTR(EMU_GIT_HASH)
|
||||
#endif
|
||||
|
||||
#define COPYRIGHT_YEAR "@EMU_COPYRIGHT_YEAR@"
|
||||
#define COPYRIGHT_YEAR "@EMU_COPYRIGHT_YEAR@"
|
||||
|
||||
/* Web URL info. */
|
||||
#define EMU_SITE "86box.net"
|
||||
#define EMU_SITE_W LSTR(EMU_SITE)
|
||||
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
|
||||
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
|
||||
#define EMU_SITE "86box.net"
|
||||
#define EMU_SITE_W LSTR(EMU_SITE)
|
||||
#define EMU_ROMS_URL "https://github.com/86Box/roms/releases/latest"
|
||||
#define EMU_ROMS_URL_W LSTR(EMU_ROMS_URL)
|
||||
#ifdef RELEASE_BUILD
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@/"
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io/en/v@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@/"
|
||||
#else
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io"
|
||||
# define EMU_DOCS_URL "https://86box.readthedocs.io"
|
||||
#endif
|
||||
#define EMU_DOCS_URL_W LSTR(EMU_DOCS_URL)
|
||||
#define EMU_DOCS_URL_W LSTR(EMU_DOCS_URL)
|
||||
|
||||
@@ -13,10 +13,12 @@
|
||||
* Authors: Sarah Walker, <https://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
* Melissa Goad, <mszoopers@protonmail.com>
|
||||
* Jasmine Iwanek, <jriwanek@gmail.com>
|
||||
*
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2020 Melissa Goad.
|
||||
* Copyright 2020 Melissa Goad.
|
||||
* Copyright 2022-2023 Jasmine Iwanek.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
@@ -67,23 +69,69 @@ static char flash_path[1024];
|
||||
/* 1st cycle variant only on 39 */
|
||||
|
||||
#define SST 0xbf /* SST Manufacturer's ID */
|
||||
|
||||
#define SST29EE512 0x5d00
|
||||
#define SST29LE_VE512 0x3d00
|
||||
#define SST29EE010 0x0700
|
||||
#define SST29LE_VE010 0x0800
|
||||
#define SST29EE020 0x1000
|
||||
#define SST29LE_VE020 0x1200
|
||||
|
||||
#define SST39SF512 0xb400
|
||||
#define SST39SF010 0xb500
|
||||
#define SST39SF020 0xb600
|
||||
#define SST39SF040 0xb700
|
||||
|
||||
#define WINBOND 0xda /* Winbond Manufacturer's ID */
|
||||
#define W29C010 0xC100
|
||||
#define W29C020 0x4500
|
||||
#define SST39LF512 0xd400
|
||||
#define SST39LF010 0xd500
|
||||
#define SST39LF020 0xd600
|
||||
#define SST39LF040 0xd700
|
||||
#define SST39LF080 0xd800
|
||||
#define SST39LF016 0xd900
|
||||
|
||||
#define SIZE_512K 0x010000
|
||||
#define SIZE_1M 0x020000
|
||||
#define SIZE_2M 0x040000
|
||||
#define SIZE_4M 0x080000
|
||||
/*
|
||||
// 16 wide
|
||||
#define SST39WF400 0x272f
|
||||
#define SST39WF400B 0x272e
|
||||
#define SST39WF800 0x273f
|
||||
#define SST39WF800B 0x273e
|
||||
#define SST39WF1601 0xbf274b
|
||||
#define SST39WF1602 0xbf274a
|
||||
|
||||
#define SST39LF100 0x2788
|
||||
#define SST39LF200 0x2789
|
||||
#define SST39LF400 0x2780
|
||||
#define SST39LF800 0x2781
|
||||
#define SST39LF160 0x2782
|
||||
*/
|
||||
|
||||
#define SST49LF002 0x5700
|
||||
#define SST49LF020 0x6100
|
||||
#define SST49LF020A 0x5200
|
||||
#define SST49LF003 0x1b00
|
||||
#define SST49LF004 0x6000
|
||||
#define SST49LF004C 0x5400
|
||||
#define SST49LF040 0x5100
|
||||
#define SST49LF008 0x5a00
|
||||
#define SST49LF008C 0x5900
|
||||
#define SST49LF080 0x5b00
|
||||
#define SST49LF030 0x1c00
|
||||
#define SST49LF160 0x4c00
|
||||
#define SST49LF016 0x5c00
|
||||
|
||||
#define WINBOND 0xda /* Winbond Manufacturer's ID */
|
||||
#define W29C512 0xc800
|
||||
#define W29C010 0xc100
|
||||
#define W29C020 0x4500
|
||||
#define W29C040 0x4600
|
||||
|
||||
#define SIZE_512K 0x010000
|
||||
#define SIZE_1M 0x020000
|
||||
#define SIZE_2M 0x040000
|
||||
#define SIZE_3M 0x060000
|
||||
#define SIZE_4M 0x080000
|
||||
#define SIZE_8M 0x100000
|
||||
#define SIZE_16M 0x200000
|
||||
|
||||
static void
|
||||
sst_sector_erase(sst_t *dev, uint32_t addr)
|
||||
@@ -483,20 +531,6 @@ const device_t sst_flash_29ee010_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t winbond_flash_w29c010_device = {
|
||||
.name = "Winbond W29C010 Flash BIOS",
|
||||
.internal_name = "winbond_flash_w29c010",
|
||||
.flags = 0,
|
||||
.local = WINBOND | W29C010 | SIZE_1M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_29ee020_device = {
|
||||
.name = "SST 29EE020 Flash BIOS",
|
||||
.internal_name = "sst_flash_29ee020",
|
||||
@@ -511,6 +545,34 @@ const device_t sst_flash_29ee020_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t winbond_flash_w29c512_device = {
|
||||
.name = "Winbond W29C512 Flash BIOS",
|
||||
.internal_name = "winbond_flash_w29c512",
|
||||
.flags = 0,
|
||||
.local = WINBOND | W29C010 | SIZE_512K,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t winbond_flash_w29c010_device = {
|
||||
.name = "Winbond W29C010 Flash BIOS",
|
||||
.internal_name = "winbond_flash_w29c010",
|
||||
.flags = 0,
|
||||
.local = WINBOND | W29C010 | SIZE_1M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t winbond_flash_w29c020_device = {
|
||||
.name = "Winbond W29C020 Flash BIOS",
|
||||
.internal_name = "winbond_flash_w29c020",
|
||||
@@ -525,6 +587,34 @@ const device_t winbond_flash_w29c020_device = {
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t winbond_flash_w29c040_device = {
|
||||
.name = "Winbond W29C040 Flash BIOS",
|
||||
.internal_name = "winbond_flash_w29c040",
|
||||
.flags = 0,
|
||||
.local = WINBOND | W29C040 | SIZE_4M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_39sf512_device = {
|
||||
.name = "SST 39SF512 Flash BIOS",
|
||||
.internal_name = "sst_flash_39sf512",
|
||||
.flags = 0,
|
||||
.local = SST | SST39SF512 | SIZE_512K,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_39sf010_device = {
|
||||
.name = "SST 39SF010 Flash BIOS",
|
||||
.internal_name = "sst_flash_39sf010",
|
||||
@@ -566,3 +656,278 @@ const device_t sst_flash_39sf040_device = {
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_39lf512_device = {
|
||||
.name = "SST 39LF512 Flash BIOS",
|
||||
.internal_name = "sst_flash_39lf512",
|
||||
.flags = 0,
|
||||
.local = SST | SST39LF512 | SIZE_512K,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_39lf010_device = {
|
||||
.name = "SST 39LF010 Flash BIOS",
|
||||
.internal_name = "sst_flash_39lf010",
|
||||
.flags = 0,
|
||||
.local = SST | SST39LF010 | SIZE_1M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_39lf020_device = {
|
||||
.name = "SST 39LF020 Flash BIOS",
|
||||
.internal_name = "sst_flash_39lf020",
|
||||
.flags = 0,
|
||||
.local = SST | SST39LF020 | SIZE_2M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_39lf040_device = {
|
||||
.name = "SST 39LF040 Flash BIOS",
|
||||
.internal_name = "sst_flash_39lf040",
|
||||
.flags = 0,
|
||||
.local = SST | SST39LF040 | SIZE_4M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_39lf080_device = {
|
||||
.name = "SST 39LF080 Flash BIOS",
|
||||
.internal_name = "sst_flash_39lf080",
|
||||
.flags = 0,
|
||||
.local = SST | SST39LF080 | SIZE_8M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_39lf016_device = {
|
||||
.name = "SST 39LF016 Flash BIOS",
|
||||
.internal_name = "sst_flash_39lf016",
|
||||
.flags = 0,
|
||||
.local = SST | SST39LF016 | SIZE_16M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
/*
|
||||
* Firmware Hubs. The FWH signals are not implemented yet. Firmware Hubs do write cycles
|
||||
* to read/write on the flash. SST Flashes still do traditional flashing via PP Mode. Our
|
||||
* BIOS firmwares don't seem to utilize FWH R/W thus the FWH ports remain unknown for an
|
||||
* implementation. We just contain the ID's so the BIOS can do ESCD & DMI writes with no
|
||||
* worries.
|
||||
*/
|
||||
|
||||
const device_t sst_flash_49lf002_device = {
|
||||
.name = "SST 49LF002 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf002",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF002 | SIZE_2M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf020_device = {
|
||||
.name = "SST 49LF020 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf0020",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF020 | SIZE_2M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf020a_device = {
|
||||
.name = "SST 49LF020A Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf0020a",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF020A | SIZE_2M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf003_device = {
|
||||
.name = "SST 49LF003 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf003",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF003 | SIZE_3M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf030_device = {
|
||||
.name = "SST 49LF030 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf030",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF030 | SIZE_3M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf004_device = {
|
||||
.name = "SST 49LF004 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf004",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF004 | SIZE_4M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf004c_device = {
|
||||
.name = "SST 49LF004C Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf004c",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF004C | SIZE_4M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf040_device = {
|
||||
.name = "SST 49LF040 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf040",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF040 | SIZE_4M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf008_device = {
|
||||
.name = "SST 49LF008 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf008",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF008 | SIZE_8M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf008c_device = {
|
||||
.name = "SST 49LF008C Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf008c",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF008C | SIZE_8M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf080_device = {
|
||||
.name = "SST 49LF080 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf080",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF080 | SIZE_8M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf016_device = {
|
||||
.name = "SST 49LF016 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf016",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF016 | SIZE_16M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
const device_t sst_flash_49lf160_device = {
|
||||
|
||||
.name = "SST 49LF160 Firmware Hub",
|
||||
.internal_name = "sst_flash_49lf160",
|
||||
.flags = 0,
|
||||
.local = SST | SST49LF160 | SIZE_16M,
|
||||
.init = sst_init,
|
||||
.close = sst_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
@@ -624,11 +624,11 @@ ui_msgbox_header(int flags, void *header, void *message)
|
||||
SDL_MessageBoxData msgdata;
|
||||
SDL_MessageBoxButtonData msgbtn;
|
||||
if (!header)
|
||||
header = (flags & MBX_ANSI) ? "86Box" : L"86Box";
|
||||
header = (void *) (flags & MBX_ANSI) ? "86Box" : L"86Box";
|
||||
if (header <= (void *) 7168)
|
||||
header = plat_get_string(header);
|
||||
header = (void *) plat_get_string((int) header);
|
||||
if (message <= (void *) 7168)
|
||||
message = plat_get_string(message);
|
||||
message = (void *) plat_get_string((int) message);
|
||||
msgbtn.buttonid = 1;
|
||||
msgbtn.text = "OK";
|
||||
msgbtn.flags = 0;
|
||||
|
||||
@@ -240,44 +240,33 @@ VPATH := $(EXPATH) . $(CODEGEN) minitrace cpu \
|
||||
sound/munt/srchelper sound/munt/srchelper/srctools/src \
|
||||
sound/resid-fp sound/ymfm \
|
||||
scsi video network network/slirp win
|
||||
|
||||
WINDRES := windres
|
||||
STRIP := strip
|
||||
ifeq ($(X64), y)
|
||||
TOOL_PREFIX := x86_64-w64-mingw32-
|
||||
else
|
||||
TOOL_PREFIX := i686-w64-mingw32-
|
||||
endif
|
||||
WINDRES := windres
|
||||
STRIP := strip
|
||||
ifeq ($(ARM64), y)
|
||||
WINDRES := aarch64-w64-mingw32-windres
|
||||
STRIP := aarch64-w64-mingw32-strip
|
||||
endif
|
||||
ifeq ($(ARM), y)
|
||||
WINDRES := armv7-w64-mingw32-windres
|
||||
STRIP := armv7-w64-mingw32-strip
|
||||
endif
|
||||
ifeq ($(CLANG), y)
|
||||
CPP := clang++
|
||||
CC := clang
|
||||
ifeq ($(ARM64), y)
|
||||
CPP := aarch64-w64-mingw32-clang++
|
||||
CC := aarch64-w64-mingw32-clang
|
||||
TOOL_PREFIX := aarch64-w64-mingw32-
|
||||
WINDRES := ${TOOL_PREFIX}windres
|
||||
STRIP := ${TOOL_PREFIX}strip
|
||||
endif
|
||||
ifeq ($(ARM), y)
|
||||
CPP := armv7-w64-mingw32-clang++
|
||||
CC := armv7-w64-mingw32-clang
|
||||
TOOL_PREFIX := armv7-w64-mingw32-
|
||||
WINDRES := ${TOOL_PREFIX}windres
|
||||
STRIP := ${TOOL_PREFIX}strip
|
||||
endif
|
||||
TOOL_PREFIX := i686-w64-mingw32-
|
||||
endif
|
||||
|
||||
ifeq ($(CLANG), y)
|
||||
CPP := ${TOOL_PREFIX}clang++
|
||||
CC := ${TOOL_PREFIX}clang
|
||||
else
|
||||
CPP := ${TOOL_PREFIX}g++
|
||||
CC := ${TOOL_PREFIX}gcc
|
||||
ifeq ($(ARM64), y)
|
||||
CPP := aarch64-w64-mingw32-g++
|
||||
CC := aarch64-w64-mingw32-gcc
|
||||
endif
|
||||
ifeq ($(ARM), y)
|
||||
CPP := armv7-w64-mingw32-g++
|
||||
CC := armv7-w64-mingw32-gcc
|
||||
endif
|
||||
endif
|
||||
|
||||
DEPS = -MMD -MF $*.d -c $<
|
||||
DEPFILE := win/.depends
|
||||
|
||||
|
||||
Reference in New Issue
Block a user