Applied all relevant upstream patches.
Cleaned up the CD-ROM stuff a bit more, merging the drive and the image parts. Updated disk, cdrom and zip structures to use the same bus_id union.
This commit is contained in:
22
src/mem.c
22
src/mem.c
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Memory handling and MMU.
|
||||
*
|
||||
* Version: @(#)mem.c 1.0.21 2018/10/05
|
||||
* Version: @(#)mem.c 1.0.22 2018/10/16
|
||||
*
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -1213,13 +1213,21 @@ mem_write_nulll(uint32_t addr, uint32_t val, void *p)
|
||||
void
|
||||
mem_invalidate_range(uint32_t start_addr, uint32_t end_addr)
|
||||
{
|
||||
uint32_t cur_addr;
|
||||
|
||||
start_addr &= ~PAGE_MASK_MASK;
|
||||
end_addr = (end_addr + PAGE_MASK_MASK) & ~PAGE_MASK_MASK;
|
||||
|
||||
for (; start_addr <= end_addr; start_addr += (1 << PAGE_MASK_SHIFT)) {
|
||||
uint64_t mask = (uint64_t)1 << ((start_addr >> PAGE_MASK_SHIFT) & PAGE_MASK_MASK);
|
||||
|
||||
pages[start_addr >> 12].dirty_mask[(start_addr >> PAGE_MASK_INDEX_SHIFT) & PAGE_MASK_INDEX_MASK] |= mask;
|
||||
/*
|
||||
* Do nothing if the pages array is empty or DMA reads/writes
|
||||
* to/from PCI device memory addresses may crash the emulator.
|
||||
*/
|
||||
cur_addr = (start_addr >> 12);
|
||||
if (cur_addr < pages_sz)
|
||||
pages[cur_addr].dirty_mask[(start_addr >> PAGE_MASK_INDEX_SHIFT) & PAGE_MASK_INDEX_MASK] |= mask;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1649,7 +1657,17 @@ mem_reset(void)
|
||||
}
|
||||
} else {
|
||||
/* 8088/86; maximum address space is 1MB. */
|
||||
#if 1
|
||||
/*
|
||||
* According to the 86Box folks, the Toshiba T1200 can
|
||||
* take up to 2 MB of RAM. Weird, since it uses a 8086,
|
||||
* which cannot address that much other than using it
|
||||
* as "hard ram", aka battery-backed EMS memory. --FvK
|
||||
*/
|
||||
m = 512;
|
||||
#else
|
||||
m = 256;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user