More Compaq-specific tweaks
This commit is contained in:
parent
9b1de72137
commit
b9252390bf
6 changed files with 339 additions and 179 deletions
|
|
@ -476,17 +476,21 @@ Bus.prototype.getA20 = function()
|
|||
*/
|
||||
Bus.prototype.setA20 = function(fEnable)
|
||||
{
|
||||
this.assert(fEnable !== undefined);
|
||||
if (fEnable !== undefined) {
|
||||
if (this.nBusWidth > 20) {
|
||||
var addrMask = (this.busMask & ~0x100000) | (fEnable? 0x100000 : 0);
|
||||
if (addrMask != this.busMask) {
|
||||
this.busMask = addrMask;
|
||||
/*
|
||||
* This callback is required only because the CPU "insists" on using its own memory access functions.
|
||||
*/
|
||||
if (this.cpu) this.cpu.setAddressMask(addrMask);
|
||||
}
|
||||
/*
|
||||
* TODO: Until I determine why the Compaq DeskPro 386 ROM is switching to protected-mode
|
||||
* with the A20 line disabled, resulting in an almost immediate crash, I'm ignoring its requests
|
||||
* to turn A20 off.
|
||||
*/
|
||||
if (I386 && COMPAQ386) fEnable = true;
|
||||
|
||||
if (this.nBusWidth > 20) {
|
||||
var addrMask = (this.busMask & ~0x100000) | (fEnable? 0x100000 : 0);
|
||||
if (addrMask != this.busMask) {
|
||||
this.busMask = addrMask;
|
||||
/*
|
||||
* This callback is required only because the CPU "insists" on using its own memory access functions.
|
||||
*/
|
||||
if (this.cpu) this.cpu.setAddressMask(addrMask);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue