Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Issue #21) Increase Supported Memory to 256MB #131

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dosbox/src/dosbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion dosbox/src/hardware/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions dosbox/src/ints/bios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down