From 7c919537f0604daf895981c10bebd36ee67cd2c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Sat, 17 Dec 2005 16:28:18 +0000 Subject: [PATCH] add truemem field, correct reported memory for tandy (Transsylvania/TandyDOS) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2415 --- include/bios.h | 1 + src/ints/bios.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/bios.h b/include/bios.h index ccb4d9ee..fc015ccc 100644 --- a/include/bios.h +++ b/include/bios.h @@ -30,6 +30,7 @@ #define BIOS_CONFIGURATION 0x410 /* 0x412 is reserved */ #define BIOS_MEMORY_SIZE 0x413 +#define BIOS_TRUE_MEMORY_SIZE 0x415 /* #define bios_expansion_memory_size (*(unsigned int *) 0x415) */ #define BIOS_KEYBOARD_STATE 0x417 #define BIOS_KEYBOARD_FLAGS1 BIOS_KEYBOARD_STATE diff --git a/src/ints/bios.cpp b/src/ints/bios.cpp index a07aeb1d..11ca7096 100644 --- a/src/ints/bios.cpp +++ b/src/ints/bios.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: bios.cpp,v 1.53 2005-12-04 21:17:29 c2woody Exp $ */ +/* $Id: bios.cpp,v 1.54 2005-12-17 16:28:18 c2woody Exp $ */ #include "dosbox.h" #include "mem.h" @@ -835,7 +835,13 @@ public: /* INT 12 Memory Size default at 640 kb */ callback[2].Install(&INT12_Handler,CB_IRET,"Int 12 Memory"); callback[2].Set_RealVec(0x12); - mem_writew(BIOS_MEMORY_SIZE,640); + if (IS_TANDY_ARCH) { + /* reduce reported memory size for the Tandy (32k graphics memory + at the end of the conventional 640k) */ + if (machine==MCH_TANDY) mem_writew(BIOS_MEMORY_SIZE,608); + else mem_writew(BIOS_MEMORY_SIZE,640); + mem_writew(BIOS_TRUE_MEMORY_SIZE,640); + } else mem_writew(BIOS_MEMORY_SIZE,640); /* INT 13 Bios Disk Support */ BIOS_SetupDisks();