Fix for small issue in XT ST506 driver.
Updated mem.c to remove last remnants of split_mapping. Updated machine_table.c for actual NEAT chipset DRAM limit.
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
* Since all controllers (including the ones made by DTC) use
|
* Since all controllers (including the ones made by DTC) use
|
||||||
* (mostly) the same API, we keep them all in this module.
|
* (mostly) the same API, we keep them all in this module.
|
||||||
*
|
*
|
||||||
* Version: @(#)hdc_st506_xt.c 1.0.10 2018/05/06
|
* Version: @(#)hdc_st506_xt.c 1.0.11 2018/08/23
|
||||||
*
|
*
|
||||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
* Sarah Walker, <tommowalker@tommowalker.co.uk>
|
||||||
@@ -843,16 +843,17 @@ st506_set_switches(hdc_t *dev)
|
|||||||
if (drive->spt == 17 &&
|
if (drive->spt == 17 &&
|
||||||
drive->hpc == hd_types[c].hpc &&
|
drive->hpc == hd_types[c].hpc &&
|
||||||
drive->tracks == hd_types[c].tracks) {
|
drive->tracks == hd_types[c].tracks) {
|
||||||
dev->switches |= (c << (d ? 0 : 2));
|
dev->switches |= (c << (d * 2));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_HDC_LOG
|
pclog("ST506: ");
|
||||||
if (c == 4)
|
if (c == 4)
|
||||||
hdc_log("WARNING: drive %d has unsupported format %d/%d/%d !\n",
|
pclog("*WARNING* drive %d has unsupported format", d);
|
||||||
d, drive->tracks, drive->hpc, drive->spt);
|
else
|
||||||
#endif
|
pclog("drive %d is type %d", d, c);
|
||||||
|
pclog(" (%d/%d/%d)\n", drive->tracks, drive->hpc, drive->spt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
* NOTES: OpenAT wip for 286-class machine with open BIOS.
|
* NOTES: OpenAT wip for 286-class machine with open BIOS.
|
||||||
* PS2_M80-486 wip, pending receipt of TRM's for machine.
|
* PS2_M80-486 wip, pending receipt of TRM's for machine.
|
||||||
*
|
*
|
||||||
* Version: @(#)machine_table.c 1.0.23 2018/06/14
|
* Version: @(#)machine_table.c 1.0.24 2018/08/22
|
||||||
*
|
*
|
||||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -85,7 +85,7 @@ const machine_t machines[] = {
|
|||||||
{ "[8086] VTech Laser XT3", ROM_LXT3, "vtech_lxt3", L"vtech/lxt3", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 256, 512, 256, 0, machine_xt_laserxt_init, NULL, NULL },
|
{ "[8086] VTech Laser XT3", ROM_LXT3, "vtech_lxt3", L"vtech/lxt3", {{"", cpus_8086}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA, 256, 512, 256, 0, machine_xt_laserxt_init, NULL, NULL },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{ "[286 ISA] AMI 286 clone", ROM_AMI286, "ami_286", L"generic/ami/286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512,16384, 128, 128, machine_at_neat_ami_init, NULL, NULL },
|
{ "[286 ISA] AMI 286 clone", ROM_AMI286, "ami_286", L"generic/ami/286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512, 8192, 128, 128, machine_at_neat_ami_init, NULL, NULL },
|
||||||
{ "[286 ISA] Award 286 clone", ROM_AWARD286, "award_286", L"generic/award/286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512,16384, 128, 128, machine_at_scat_init, NULL, NULL },
|
{ "[286 ISA] Award 286 clone", ROM_AWARD286, "award_286", L"generic/award/286", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 512,16384, 128, 128, machine_at_scat_init, NULL, NULL },
|
||||||
{ "[286 ISA] Commodore PC 30 III", ROM_CMDPC30, "commodore_pc30", L"commodore/pc30", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 640,16384, 128, 128, machine_at_cmdpc_init, NULL, NULL },
|
{ "[286 ISA] Commodore PC 30 III", ROM_CMDPC30, "commodore_pc30", L"commodore/pc30", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 640,16384, 128, 128, machine_at_cmdpc_init, NULL, NULL },
|
||||||
{ "[286 ISA] Compaq Portable II", ROM_PORTABLEII, "compaq_portable2", L"compaq/portable2", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 640,16384, 128, 128, machine_at_compaq_init, NULL, NULL },
|
{ "[286 ISA] Compaq Portable II", ROM_PORTABLEII, "compaq_portable2", L"compaq/portable2", {{"", cpus_286}, {"", NULL}, {"", NULL}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT, 640,16384, 128, 128, machine_at_compaq_init, NULL, NULL },
|
||||||
@@ -107,7 +107,7 @@ const machine_t machines[] = {
|
|||||||
{ "[386SX ISA] AMI 386SX clone", ROM_AMI386SX, "ami_386", L"generic/ami/386", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512,16384, 128, 128, machine_at_headland_init, NULL, NULL },
|
{ "[386SX ISA] AMI 386SX clone", ROM_AMI386SX, "ami_386", L"generic/ami/386", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512,16384, 128, 128, machine_at_headland_init, NULL, NULL },
|
||||||
{ "[386SX ISA] Amstrad MegaPC", ROM_MEGAPC, "amstrad_megapc", L"amstrad/megapc", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_VIDEO | MACHINE_HDC, 1, 16, 1, 128, machine_at_wd76c10_init, NULL, NULL },
|
{ "[386SX ISA] Amstrad MegaPC", ROM_MEGAPC, "amstrad_megapc", L"amstrad/megapc", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_VIDEO | MACHINE_HDC, 1, 16, 1, 128, machine_at_wd76c10_init, NULL, NULL },
|
||||||
{ "[386SX ISA] Award 386SX clone", ROM_AWARD386SX_OPTI495, "award_386sx", L"generic/award/opti495", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 64, 1, 128, machine_at_opti495_init, NULL, NULL },
|
{ "[386SX ISA] Award 386SX clone", ROM_AWARD386SX_OPTI495, "award_386sx", L"generic/award/opti495", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 1, 64, 1, 128, machine_at_opti495_init, NULL, NULL },
|
||||||
{ "[386SX ISA] DTK 386SX clone", ROM_DTK386, "dtk_386", L"dtk/386", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512,16384, 128, 128, machine_at_neat_init, NULL, NULL },
|
{ "[386SX ISA] DTK 386SX clone", ROM_DTK386, "dtk_386", L"dtk/386", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_HDC, 512, 8192, 128, 128, machine_at_neat_init, NULL, NULL },
|
||||||
{ "[386SX ISA] IBM PS/1 model 2121", ROM_IBMPS1_2121, "ibm_ps1_2121", L"ibm/ps1_2121", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO, 1, 6, 1, 64, machine_ps1_m2121_init, &m_ps1_device, NULL },
|
{ "[386SX ISA] IBM PS/1 model 2121", ROM_IBMPS1_2121, "ibm_ps1_2121", L"ibm/ps1_2121", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 1, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO, 1, 6, 1, 64, machine_ps1_m2121_init, &m_ps1_device, NULL },
|
||||||
{ "[386SX ISA] IBM PS/1 m.2121+ISA", ROM_IBMPS1_2121_ISA, "ibm_ps1_2121_isa", L"ibm/ps1_2121", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO, 1, 6, 1, 64, machine_ps1_m2121_init, &m_ps1_device, NULL },
|
{ "[386SX ISA] IBM PS/1 m.2121+ISA", ROM_IBMPS1_2121_ISA, "ibm_ps1_2121_isa", L"ibm/ps1_2121", {{"Intel", cpus_i386SX}, {"AMD", cpus_Am386SX}, {"Cyrix", cpus_486SLC}, {"", NULL}, {"", NULL}}, 0, MACHINE_ISA | MACHINE_AT | MACHINE_PS2 | MACHINE_HDC | MACHINE_VIDEO, 1, 6, 1, 64, machine_ps1_m2121_init, &m_ps1_device, NULL },
|
||||||
|
|
||||||
|
|||||||
14
src/mem.c
14
src/mem.c
@@ -12,7 +12,7 @@
|
|||||||
* the DYNAMIC_TABLES=1 enables this. Will eventually go
|
* the DYNAMIC_TABLES=1 enables this. Will eventually go
|
||||||
* away, either way...
|
* away, either way...
|
||||||
*
|
*
|
||||||
* Version: @(#)mem.c 1.0.17 2018/08/20
|
* Version: @(#)mem.c 1.0.18 2018/08/22
|
||||||
*
|
*
|
||||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -1772,16 +1772,20 @@ mem_remap_top(int kb)
|
|||||||
pclog("MEM: remapping top %iKB (mem=%i)\n", kb, mem_size);
|
pclog("MEM: remapping top %iKB (mem=%i)\n", kb, mem_size);
|
||||||
if (mem_size <= 640) return;
|
if (mem_size <= 640) return;
|
||||||
|
|
||||||
|
if (kb == 0) {
|
||||||
|
/* Called to disable the mapping. */
|
||||||
|
mem_mapping_disable(&ram_remapped_mapping);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (size > kb)
|
if (size > kb)
|
||||||
size = kb;
|
size = kb;
|
||||||
|
|
||||||
mem_set_mem_state(start * 1024, size * 1024,
|
mem_set_mem_state(start * 1024, size * 1024,
|
||||||
MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
|
MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
|
||||||
mem_mapping_set_addr(&ram_remapped_mapping, start * 1024, size * 1024);
|
mem_mapping_set_addr(&ram_remapped_mapping, start * 1024, size * 1024);
|
||||||
#if 0
|
mem_mapping_set_exec(&ram_remapped_mapping, ram + (start * 1024));
|
||||||
//FIXME: was this a typo for mem_remapped_mapping? --FvK
|
|
||||||
mem_mapping_set_exec(&ram_split_mapping, ram + (start * 1024));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
flushmmucache();
|
flushmmucache();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user