From abce83ad340fad73f1afc8ffa6336179d916d629 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 26 Jan 2022 23:24:19 -0500 Subject: [PATCH] Initial Boca Research BocaRAM/AT support --- CMakeLists.txt | 1 + src/device/CMakeLists.txt | 6 ++- src/device/isamem.c | 92 +++++++++++++++++++++++++++++++++++++++ src/win/Makefile.mingw | 10 +++++ 4 files changed, 108 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 98ab7c3fd..e24d56111 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,6 +130,7 @@ cmake_dependent_option(VNC "VNC renderer" cmake_dependent_option(XL24 "ATI VGA Wonder XL24 (ATI-28800-6)" ON "DEV_BRANCH" OFF) cmake_dependent_option(ISAMEM_RAMPAGE "AST Rampage" ON "DEV_BRANCH" OFF) cmake_dependent_option(ISAMEM_IAB "Intel Above Board" ON "DEV_BRANCH" OFF) +cmake_dependent_option(ISAMEM_BRAT "BocaRAM/AT" ON "DEV_BRANCH" OFF) # Determine the build type set(RELEASE_BUILD OFF) diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt index 2b7b34c7b..5d7d2d752 100644 --- a/src/device/CMakeLists.txt +++ b/src/device/CMakeLists.txt @@ -29,4 +29,8 @@ endif() if(ISAMEM_IAB) target_compile_definitions(dev PRIVATE USE_ISAMEM_IAB) -endif() \ No newline at end of file +endif() + +if(ISAMEM_BRAT) + target_compile_definitions(dev PRIVATE USE_ISAMEM_BRAT) +endif() diff --git a/src/device/isamem.c b/src/device/isamem.c index b16d5d247..54d78eb24 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -94,6 +94,7 @@ #define ISAMEM_EV159_CARD 10 #define ISAMEM_RAMPAGEXT_CARD 11 #define ISAMEM_ABOVEBOARD_CARD 12 +#define ISAMEM_BRAT_CARD 13 #define ISAMEM_DEBUG 0 @@ -451,6 +452,7 @@ dev->frame_addr = 0xE0000; case ISAMEM_RAMPAGEXT_CARD: /* AST RAMpage/XT */ case ISAMEM_ABOVEBOARD_CARD: /* Intel AboveBoard */ + case ISAMEM_BRAT_CARD: /* BocaRAM/AT */ dev->base_addr = device_get_config_hex16("base"); dev->total_size = device_get_config_int("size"); dev->start_addr = device_get_config_int("start"); @@ -984,6 +986,96 @@ static const device_t ev159_device = { }; +#ifdef USE_ISAMEM_BRAT +static const device_config_t brat_config[] = +{ + { + "base", "Address", CONFIG_HEX16, "", 0x0258, "", { 0 }, + { + { + "208H", 0x0208 + }, + { + "218H", 0x0218 + }, + { + "258H", 0x0258 + }, + { + "268H", 0x0268 + }, + { + "" + } + }, + }, + { + "frame", "Frame Address", CONFIG_HEX20, "", 0, "", { 0 }, + { + { + "Disabled", 0x00000 + }, + { + "D000H", 0xD0000 + }, + { + "E000H", 0xE0000 + }, + { + "" + } + }, + }, + { + "width", "I/O Width", CONFIG_SELECTION, "", 8, "", { 0 }, + { + { + "8-bit", 8 + }, + { + "16-bit", 16 + }, + { + "" + } + }, + }, + { + "speed", "Transfer Speed", CONFIG_SELECTION, "", 0, "", { 0 }, + { + { + "Standard", 0 + }, + { + "High-Speed", 1 + }, + { + "" + } + } + }, + { + "size", "Memory Size", CONFIG_SPINNER, "", 128, + "", + { 0, 8192, 512 }, + { 0 } + }, + { + "", "", -1 + } +}; + +static const device_t brat_device = { + "BocaRAM/AT", + DEVICE_ISA, + ISAMEM_BRAT_CARD, + isamem_init, isamem_close, NULL, + { NULL }, NULL, NULL, + brat_config +}; +#endif + + #ifdef USE_ISAMEM_RAMPAGE static const device_config_t rampage_config[] = { diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 9ee608c4f..cae57102b 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -75,6 +75,9 @@ ifeq ($(DEV_BUILD), y) ifndef ISAMEM_IAB ISAMEM_IAB := y endif + ifndef ISAMEM_BRAT + ISAMEM_BRAT := y + endif ifndef OLIVETTI OLIVETTI := y endif @@ -130,6 +133,9 @@ else ifndef ISAMEM_IAB ISAMEM_IAB := n endif + ifndef ISAMEM_BRAT + ISAMEM_BRAT := n + endif ifndef OLIVETTI OLIVETTI := n endif @@ -470,6 +476,10 @@ ifeq ($(ISAMEM_IAB), y) OPTS += -DUSE_ISAMEM_IAB endif +ifeq ($(ISAMEM_BRAT), y) +OPTS += -DUSE_ISAMEM_BRAT +endif + ifeq ($(OLIVETTI), y) OPTS += -DUSE_OLIVETTI DEVBROBJ += olivetti_eva.o