Added support for JVERNET's V86P ROM's, and fixed the bugs reported by lemondrops.
This commit is contained in:
@@ -60,7 +60,7 @@ ct_82c100_ems_pages_recalc(ct_82c100_t *dev)
|
||||
page_base = dev->ems_window_base + (i << 14);
|
||||
if (dev->ems_page_regs[i] & 0x80) {
|
||||
dev->ems_pages[i].virt = page_base;
|
||||
dev->ems_pages[i].phys = 0xa0000 + (((uint32_t) (dev->ems_page_regs[4] & 0x7f)) << 14);
|
||||
dev->ems_pages[i].phys = 0xa0000 + (((uint32_t) (dev->ems_page_regs[i] & 0x7f)) << 14);
|
||||
mem_mapping_set_addr(&(dev->ems_mappings[i]), dev->ems_pages[i].virt, 0x4000);
|
||||
mem_mapping_set_exec(&(dev->ems_mappings[i]), &(ram[dev->ems_pages[i].phys]));
|
||||
mem_set_mem_state_both(page_base, 0x00004000, MEM_READ_INTERNAL | MEM_WRITE_INTERNAL);
|
||||
|
@@ -50,7 +50,7 @@
|
||||
int
|
||||
machine_v86p_init(const machine_t *model)
|
||||
{
|
||||
int ret;
|
||||
int ret, rom = 0;
|
||||
|
||||
ret = bios_load_interleavedr("roms/machines/v86p/INTEL8086AWD_BIOS_S3.1_V86P_122089_Even.rom",
|
||||
"roms/machines/v86p/INTEL8086AWD_BIOS_S3.1_V86P_122089_Odd.rom",
|
||||
@@ -58,15 +58,27 @@ machine_v86p_init(const machine_t *model)
|
||||
|
||||
if (!ret) {
|
||||
/* Try an older version of the BIOS. */
|
||||
rom = 1;
|
||||
ret = bios_load_interleavedr("roms/machines/v86p/INTEL8086AWD_BIOS_S3.1_V86P_090489_Even.rom",
|
||||
"roms/machines/v86p/INTEL8086AWD_BIOS_S3.1_V86P_090489_Odd.rom",
|
||||
0x000f8000, 65536, 0);
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
/* Try JVERNET's BIOS. */
|
||||
rom = 2;
|
||||
ret = bios_load_linear("roms/machines/v86p/V86P.ROM",
|
||||
0x000f0000, 65536, 0);
|
||||
|
||||
}
|
||||
|
||||
if (bios_only || !ret)
|
||||
return ret;
|
||||
|
||||
loadfont("roms/machines/v86p/v86pfont.rom", 8);
|
||||
if (rom == 2)
|
||||
loadfont("roms/machines/v86p/V86P.FON", 8);
|
||||
else
|
||||
loadfont("roms/machines/v86p/v86pfont.rom", 8);
|
||||
|
||||
machine_common_init(model);
|
||||
|
||||
|
@@ -239,7 +239,7 @@ static void f82c425_out(uint16_t addr, uint8_t val, void *p)
|
||||
if (addr == 0x3d4)
|
||||
f82c425->crtcreg = val;
|
||||
|
||||
if (f82c425->function & 0x01 == 0 && (f82c425->crtcreg != 0xdf || addr != 0x3d5))
|
||||
if (((f82c425->function & 0x01) == 0) && ((f82c425->crtcreg != 0xdf) || (addr != 0x3d5)))
|
||||
return;
|
||||
|
||||
if (addr != 0x3d5 || f82c425->crtcreg <= 31)
|
||||
@@ -282,7 +282,7 @@ static uint8_t f82c425_in(uint16_t addr, void *p)
|
||||
{
|
||||
f82c425_t *f82c425 = (f82c425_t *)p;
|
||||
|
||||
if (f82c425->function & 0x01 == 0)
|
||||
if ((f82c425->function & 0x01) == 0)
|
||||
return 0xff;
|
||||
|
||||
if (addr == 0x3d4)
|
||||
@@ -308,6 +308,8 @@ static uint8_t f82c425_in(uint16_t addr, void *p)
|
||||
case 0xdf:
|
||||
return f82c425->function;
|
||||
}
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
static void f82c425_write(uint32_t addr, uint8_t val, void *p)
|
||||
|
Reference in New Issue
Block a user