From 3dc9e113f32529a87dac3b21b6dd28b3b76910da Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 17 Oct 2018 02:47:02 +0200 Subject: [PATCH] Properly fixed the Toshiba T1200 RAM mess - pages are now only allocated for the first 1 MB, and mem_reset_page_blocks() now breaks out of the for block as soon as it hits a page that's equal to or greater than pages_sz. --- src/mem.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mem.c b/src/mem.c index 8e9f75455..ffc4026c9 100644 --- a/src/mem.c +++ b/src/mem.c @@ -12,7 +12,7 @@ * the DYNAMIC_TABLES=1 enables this. Will eventually go * away, either way... * - * Version: @(#)mem.c 1.0.16 2018/10/15 + * Version: @(#)mem.c 1.0.17 2018/10/17 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -1723,8 +1723,7 @@ mem_reset(void) } } else { /* 8088/86; maximum address space is 1MB. */ - /* m = 256; */ - m = 512; /* This is to accomodate the T1200 which can take up to 2 MB of RAM. */ + m = 256; } /* @@ -1907,6 +1906,9 @@ mem_reset_page_blocks(void) if (pages == NULL) return; for (c = 0; c < ((mem_size * 1024) >> 12); c++) { + if (c >= pages_sz) + break; + pages[c].write_b = mem_write_ramb_page; pages[c].write_w = mem_write_ramw_page; pages[c].write_l = mem_write_raml_page;