Added the NCR 53C810 PCI SCSI controller;
Fixed the behavior of the CD-ROM GET CONFIGURATION command when unimplemented features are requested; Fixed the behavior of the CD-ROM READ DVD STRUCTURE command in some situations and made it correctly report 05/30/02 for incompatible format; Reworked the PS/2 Model 80 Type 2 memory handling a bit; The emulator now allocates the few MB of space needed for pages for the entire 4 GB RAM space at the startup and only memset's it to 0 on hard reset - should make sure DMA page reads from/writes to memory-mapped devices no longer crash the emulator on invalidating the memory range; Applied app applicable PCem patches; The PS/1 Model 2133 now also applies PS/2-style NMI mask handling - fixes the 486 recompiler on this machine; Added the missing #include of "cpu/cpu.h" in io.c, fixes compiling when I/O tracing is enabled.
This commit is contained in:
12
src/mem.c
12
src/mem.c
@@ -1358,17 +1358,17 @@ void mem_init(void)
|
||||
writelookup2 = malloc(1024 * 1024 * sizeof(uintptr_t));
|
||||
rom = NULL;
|
||||
biosmask = 0xffff;
|
||||
pages = malloc((((mem_size + 384) * 1024) >> 12) * sizeof(page_t));
|
||||
pages = malloc((1 << 20) * sizeof(page_t));
|
||||
page_lookup = malloc((1 << 20) * sizeof(page_t *));
|
||||
|
||||
memset(ram, 0, mem_size * 1024);
|
||||
memset(pages, 0, (((mem_size + 384) * 1024) >> 12) * sizeof(page_t));
|
||||
memset(pages, 0, (1 << 20) * sizeof(page_t));
|
||||
|
||||
memset(page_lookup, 0, (1 << 20) * sizeof(page_t *));
|
||||
|
||||
memset(ram_mapped_addr, 0, 64 * sizeof(uint32_t));
|
||||
|
||||
for (c = 0; c < (((mem_size + 384) * 1024) >> 12); c++)
|
||||
for (c = 0; c < (1 << 20); c++)
|
||||
{
|
||||
pages[c].mem = &ram[c << 12];
|
||||
pages[c].write_b = mem_write_ramb_page;
|
||||
@@ -1461,10 +1461,8 @@ void mem_resize()
|
||||
ram = malloc(mem_size * 1024);
|
||||
memset(ram, 0, mem_size * 1024);
|
||||
|
||||
free(pages);
|
||||
pages = malloc((((mem_size + 384) * 1024) >> 12) * sizeof(page_t));
|
||||
memset(pages, 0, (((mem_size + 384) * 1024) >> 12) * sizeof(page_t));
|
||||
for (c = 0; c < (((mem_size + 384) * 1024) >> 12); c++)
|
||||
memset(pages, 0, (1 << 20) * sizeof(page_t));
|
||||
for (c = 0; c < (1 << 20); c++)
|
||||
{
|
||||
pages[c].mem = &ram[c << 12];
|
||||
pages[c].write_b = mem_write_ramb_page;
|
||||
|
||||
Reference in New Issue
Block a user