Changed serial mouse reset code to send two 'M' ID bytes; fixes #5
This commit is contained in:
parent
ebf6933536
commit
7908dcfda0
18 changed files with 1156 additions and 1246 deletions
|
|
@ -535,10 +535,8 @@ HDC.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
bus.addPortInputTable(this, this.fATC? HDC.aATCPortInput : HDC.aXTCPortInput);
|
||||
bus.addPortOutputTable(this, this.fATC? HDC.aATCPortOutput : HDC.aXTCPortOutput);
|
||||
|
||||
if (DEBUGGER) {
|
||||
cpu.addIntNotify(HDC.BIOS.INT_DISK, this, this.intBIOSDisk);
|
||||
cpu.addIntNotify(HDC.BIOS.INT_DISKETTE, this, this.intBIOSDiskette);
|
||||
}
|
||||
cpu.addIntNotify(HDC.BIOS.INT_DISK, this, this.intBIOSDisk);
|
||||
cpu.addIntNotify(HDC.BIOS.INT_DISKETTE, this, this.intBIOSDiskette);
|
||||
|
||||
/*
|
||||
* The following code used to be performed in the HDC constructor, but now we need to wait for information
|
||||
|
|
@ -1794,7 +1792,7 @@ HDC.prototype.doATCommand = function()
|
|||
this.drive = drive;
|
||||
}
|
||||
|
||||
if (DEBUG) this.messageDebugger("HDC.doATCommand(" + str.toHexByte(bCmd) + "): " + HDC.aATCCommands[bCmd], Debugger.MESSAGE_PORT | Debugger.MESSAGE_HDC);
|
||||
if (DEBUG) this.messageDebugger("HDC.doATCommand(" + str.toHexByte(bCmd) + "): " + HDC.aATCCommands[bCmd], Debugger.MESSAGE.PORT | Debugger.MESSAGE.HDC);
|
||||
|
||||
switch (bCmd & HDC.ATC.COMMAND.MASK) {
|
||||
|
||||
|
|
@ -1880,7 +1878,7 @@ HDC.prototype.doATCommand = function()
|
|||
|
||||
default:
|
||||
if (DEBUG) this.messageDebugger("HDC.doATCommand(" + str.toHexByte(this.regCommand) + "): " + (bCmd < 0? ("invalid drive (" + iDrive + ")") : "unsupported operation"));
|
||||
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_HDC) && bCmd >= 0) this.cpu.haltCPU();
|
||||
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE.HDC) && bCmd >= 0) this.cpu.haltCPU();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -2049,7 +2047,7 @@ HDC.prototype.doXTCommand = function()
|
|||
default:
|
||||
if (DEBUG) this.messageDebugger("HDC.doXTCommand(" + str.toHexByte(bCmdOrig) + "): " + (bCmd < 0? ("invalid drive (" + iDrive + ")") : "unsupported operation"));
|
||||
this.beginResult(HDC.XTC.DATA.STATUS_ERROR | bDrive);
|
||||
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_HDC) && bCmd >= 0) this.cpu.haltCPU();
|
||||
if (DEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE.HDC) && bCmd >= 0) this.cpu.haltCPU();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -2067,7 +2065,7 @@ HDC.prototype.popCmd = function()
|
|||
var bCmdIndex = this.regDataIndex;
|
||||
if (bCmdIndex < this.regDataTotal) {
|
||||
bCmd = this.regDataArray[this.regDataIndex++];
|
||||
if (DEBUG) this.messageDebugger("HDC.CMD[" + bCmdIndex + "]: 0x" + str.toHexByte(bCmd) + (!bCmdIndex && HDC.aXTCCommands[bCmd]? (" (" + HDC.aXTCCommands[bCmd] + ")") : ""), (bCmdIndex > 0? Debugger.MESSAGE_PORT : 0) | Debugger.MESSAGE_HDC);
|
||||
if (DEBUG) this.messageDebugger("HDC.CMD[" + bCmdIndex + "]: 0x" + str.toHexByte(bCmd) + (!bCmdIndex && HDC.aXTCCommands[bCmd]? (" (" + HDC.aXTCCommands[bCmd] + ")") : ""), (bCmdIndex > 0? Debugger.MESSAGE.PORT : 0) | Debugger.MESSAGE.HDC);
|
||||
}
|
||||
return bCmd;
|
||||
};
|
||||
|
|
@ -2103,7 +2101,7 @@ HDC.prototype.beginResult = function(bResult)
|
|||
*/
|
||||
HDC.prototype.pushResult = function(bResult)
|
||||
{
|
||||
if (DEBUG) this.messageDebugger("HDC.RES[" + this.regDataTotal + "]: 0x" + str.toHexByte(bResult), (this.regDataTotal > 0? Debugger.MESSAGE_PORT : 0) | Debugger.MESSAGE_HDC);
|
||||
if (DEBUG) this.messageDebugger("HDC.RES[" + this.regDataTotal + "]: 0x" + str.toHexByte(bResult), (this.regDataTotal > 0? Debugger.MESSAGE.PORT : 0) | Debugger.MESSAGE.HDC);
|
||||
this.regDataArray[this.regDataTotal++] = bResult;
|
||||
};
|
||||
|
||||
|
|
@ -2638,16 +2636,6 @@ HDC.prototype.intBIOSDisk = function(addr)
|
|||
var AH = this.cpu.regAX >> 8;
|
||||
var DL = this.cpu.regDX & 0xff;
|
||||
if (!AH && DL > 0x80) this.iDriveAllowFail = DL - 0x80;
|
||||
if (DEBUGGER) {
|
||||
if (this.dbg && this.dbg.messageEnabled(Debugger.MESSAGE_HDC | Debugger.MESSAGE_INT) && DL >= 0x80) {
|
||||
this.dbg.messageInt(HDC.BIOS.INT_DISK, addr);
|
||||
this.cpu.addIntReturn(addr, function (hdc, nCycles) {
|
||||
return function onBIOSDiskReturn(nLevel) {
|
||||
hdc.dbg.messageIntReturn(HDC.BIOS.INT_DISK, nLevel, hdc.cpu.getCycles() - nCycles);
|
||||
};
|
||||
}(this, this.cpu.getCycles()));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
@ -2702,7 +2690,7 @@ HDC.prototype.intBIOSDiskette = function(addr)
|
|||
HDC.prototype.messageDebugger = function(sMessage, bitsMessage)
|
||||
{
|
||||
if (DEBUGGER && this.dbg) {
|
||||
if (bitsMessage == null) bitsMessage = Debugger.MESSAGE_HDC;
|
||||
if (bitsMessage == null) bitsMessage = Debugger.MESSAGE.HDC;
|
||||
if (this.dbg.messageEnabled(bitsMessage)) this.dbg.message(sMessage);
|
||||
}
|
||||
};
|
||||
|
|
@ -2721,7 +2709,7 @@ HDC.prototype.messageDebugger = function(sMessage, bitsMessage)
|
|||
*/
|
||||
HDC.prototype.messagePort = function(port, bOut, addrFrom, name, bIn)
|
||||
{
|
||||
if (DEBUGGER && this.dbg) this.dbg.messagePort(this, port, bOut, addrFrom, name, Debugger.MESSAGE_HDC, bIn);
|
||||
if (DEBUGGER && this.dbg) this.dbg.messagePort(this, port, bOut, addrFrom, name, Debugger.MESSAGE.HDC, bIn);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue