From 9728739524c65142a09857ae6c0907a79776d163 Mon Sep 17 00:00:00 2001 From: Misutaa Urufu <8140068+MisutaaUrufu@users.noreply.github.com> Date: Sat, 31 Jul 2021 11:43:56 -0500 Subject: [PATCH 1/3] Add Increased Memory Support Code taken from https://www.vogons.org/viewtopic.php?p=658464#p658464, as part of the DOSBOX SVN fork. --- dosbox/src/ints/bios.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dosbox/src/ints/bios.cpp b/dosbox/src/ints/bios.cpp index a61bfe5d..07bc6dc4 100644 --- a/dosbox/src/ints/bios.cpp +++ b/dosbox/src/ints/bios.cpp @@ -790,6 +790,26 @@ static Bitu INT15_Handler(void) { LOG(LOG_BIOS,LOG_NORMAL)("INT15:Function %X called, bios mouse not supported",reg_ah); CALLBACK_SCF(true); break; + case 0xe8: + switch (reg_al) { + case 0x01: { /* E801: memory size */ + Bitu sz = MEM_TotalPages()*4; + if (sz >= 1024) sz -= 1024; + else sz = 0; + reg_ax = reg_cx = (sz > 0x3C00) ? 0x3C00 : sz; /* extended memory between 1MB and 16MB in KBs */ + sz -= reg_ax; + sz /= 64; /* extended memory size from 16MB in 64KB blocks */ + if (sz > 65535) sz = 65535; + reg_bx = reg_dx = sz; + CALLBACK_SCF(false); + } + break; + default: + LOG(LOG_BIOS,LOG_ERROR)("INT15:Unknown call %4X",reg_ax); + reg_ah=0x86; + CALLBACK_SCF(true); + } + break; default: LOG(LOG_BIOS,LOG_ERROR)("INT15:Unknown call %4X",reg_ax); reg_ah=0x86; From f4edd0798e26654cabc126b9fee704a527a47b25 Mon Sep 17 00:00:00 2001 From: Misutaa Urufu <8140068+MisutaaUrufu@users.noreply.github.com> Date: Sat, 31 Jul 2021 11:45:49 -0500 Subject: [PATCH 2/3] 256MB Support Increase supported memsize to 256MB --- dosbox/src/dosbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dosbox/src/dosbox.cpp b/dosbox/src/dosbox.cpp index 917b3c0d..99228ccc 100644 --- a/dosbox/src/dosbox.cpp +++ b/dosbox/src/dosbox.cpp @@ -426,7 +426,7 @@ void DOSBOX_Init(void) { secprop->AddInitFunction(&MEM_Init);//done secprop->AddInitFunction(&HARDWARE_Init);//done Pint = secprop->Add_int("memsize", Property::Changeable::WhenIdle,16); - Pint->SetMinMax(1,63); + Pint->SetMinMax(1,256); Pint->Set_help( "Amount of memory DOSBox has in megabytes.\n" " This value is best left at its default to avoid problems with some games,\n" From 275c621b573c383057c34288faf0540d9fbbb04b Mon Sep 17 00:00:00 2001 From: Misutaa Urufu <8140068+MisutaaUrufu@users.noreply.github.com> Date: Sat, 31 Jul 2021 11:46:51 -0500 Subject: [PATCH 3/3] 256MB Support Increase supported memsize to 256MB --- dosbox/src/hardware/memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dosbox/src/hardware/memory.cpp b/dosbox/src/hardware/memory.cpp index b03616f3..d88c537c 100644 --- a/dosbox/src/hardware/memory.cpp +++ b/dosbox/src/hardware/memory.cpp @@ -29,7 +29,7 @@ #define PAGES_IN_BLOCK ((1024*1024)/MEM_PAGE_SIZE) #define SAFE_MEMORY 32 -#define MAX_MEMORY 64 +#define MAX_MEMORY 256 #define MAX_PAGE_ENTRIES (MAX_MEMORY*1024*1024/4096) #define LFB_PAGES 512 #define MAX_LINKS ((MAX_MEMORY*1024/4)+4096) //Hopefully enough