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.

This commit is contained in:
OBattler
2018-10-17 02:47:02 +02:00
parent e668b6e87a
commit 3dc9e113f3

View File

@@ -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, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
@@ -1723,8 +1723,7 @@ mem_reset(void)
m = 4096;
}
} else {
/* 8088/86; maximum address space is 1MB. */
/* m = 256; */
/* 8088/86; maximum address space is 1MB. */
m = 256;
}
@@ -1907,6 +1906,9 @@ mem_reset_page_blocks(void)
uint32_t c;
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;