"Fake" XDF disk support works now

What this means is that XDF disk images formatted as 80-track 23-sector-per-track images will work with XDF code that honors that format; however, I've not yet been able to test with "real" XDF disk images (ie, disk images created with DiskDump using the experimental --xdf flag).  "Real" XDF disk images almost certainly need more work (eg, setting all the sector IDs properly), but the groundwork has been laid.
This commit is contained in:
Jeff Parsons 2014-10-27 22:20:41 -07:00 committed by jeffpar
commit 024f9fccf8
20 changed files with 1973 additions and 1809 deletions

View file

@ -1955,8 +1955,9 @@ Video.prototype.initBus = function(cmp, bus, cpu, dbg)
if (DEBUGGER && dbg) {
var video = this;
dbg.messageInit(Video);
this.cpu.addIntNotify(Video.BIOS.INT_VIDEO, this, this.intBIOSVideo);
dbg.messageDump(dbg.MESSAGE_VIDEO, function onDumpVideo(sParm) {
dbg.messageDump(Video.MESSAGE_VIDEO, function onDumpVideo(sParm) {
video.dumpVideo(sParm);
});
}
@ -1989,7 +1990,7 @@ Video.prototype.initBus = function(cmp, bus, cpu, dbg)
Video.prototype.intBIOSVideo = function(addr)
{
if (DEBUGGER) {
if (this.dbg && this.dbg.messageEnabled(this.dbg.MESSAGE_VIDEO)) {
if (this.dbg && this.dbg.messageEnabled(Video.MESSAGE_VIDEO | Video.MESSAGE_INT)) {
this.dbg.messageInt(Video.BIOS.INT_VIDEO, addr);
this.cpu.addIntReturn(addr, function (video, nCycles) {
return function onBIOSVideoReturn(nLevel) {
@ -3742,7 +3743,7 @@ Video.prototype.updateChar = function(col, row, data, context)
this.contextScreen.fillRect(xDst, yDst, this.cxScreenCell, this.cyScreenCell);
}
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(this.dbg.MESSAGE_VIDEO | this.dbg.MESSAGE_LOG)) {
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Video.MESSAGE_VIDEO | Video.MESSAGE_LOG)) {
this.log("updateCharBgnd(" + col + "," + row + "," + bChar + "): filled " + xDst + "," + yDst);
}
@ -3753,7 +3754,7 @@ Video.prototype.updateChar = function(col, row, data, context)
var xSrcFgnd = (bChar & 0xf) * font.cxCell;
var ySrcFgnd = (bChar >> 4) * font.cyCell;
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(this.dbg.MESSAGE_VIDEO | this.dbg.MESSAGE_LOG)) {
if (MAXDEBUG && DEBUGGER && this.dbg && this.dbg.messageEnabled(Video.MESSAGE_VIDEO | Video.MESSAGE_LOG)) {
this.log("updateCharFgnd(" + col + "," + row + "," + bChar + "): draw from " + xSrcFgnd + "," + ySrcFgnd + " (" + font.cxCell + "," + font.cyCell + ") to " + xDst + "," + yDst);
}
@ -4121,9 +4122,10 @@ Video.prototype.updateScreenGraphicsEGA = function(addrScreen, addrScreenLimit)
* whereas bit-wise operations operate ONLY on the low 32 bits.
*
* This can be confirmed by looking at dwPixel.toString(16), which returns "-80000000". The solution
* is to check for a negative dwPixel and make it positive.
* is to add 4294967296 (0x100000000) to any negative 32-bit value for which you need the positive
* representation instead.
*/
if (dwPixel < 0) dwPixel = -dwPixel;
if (dwPixel < 0) dwPixel += 0x100000000;
/*
* Since assertions don't fix problems (only catch them, and only in DEBUG builds), I'm also insuring
* that bPixel will always default to 0 if an undefined value ever slips through again.
@ -4925,7 +4927,7 @@ Video.prototype.dumpVideo = function(sParm)
Video.prototype.messageDebugger = function(sMessage, fForce)
{
if (DEBUGGER && this.dbg) {
if (fForce || this.dbg.messageEnabled(this.dbg.MESSAGE_VIDEO)) {
if (fForce || this.dbg.messageEnabled(Video.MESSAGE_VIDEO)) {
this.dbg.message(sMessage);
}
}
@ -4946,7 +4948,7 @@ Video.prototype.messageDebugger = function(sMessage, fForce)
Video.prototype.messagePort = function(port, bOut, addrFrom, name, bIn)
{
if (DEBUGGER && this.dbg) {
this.dbg.messagePort(this, port, bOut, addrFrom, name, this.dbg.MESSAGE_VIDEO, bIn);
this.dbg.messagePort(this, port, bOut, addrFrom, name, Video.MESSAGE_VIDEO, bIn);
}
};