From c29b1061dca030cdcbf50ca59ea425980896cd11 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sun, 7 Jun 2015 23:33:22 -0700 Subject: [PATCH] Start debugging HDC failure on DeskPro 386 configuration --- blog/2015/06/05/README.md | 7 ++++--- .../machine/compaq/deskpro386/vga/2048kb/machine.xml | 2 +- modules/pcjs/lib/video.js | 10 ++++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/blog/2015/06/05/README.md b/blog/2015/06/05/README.md index c73e9f58f..1dcacf0c9 100644 --- a/blog/2015/06/05/README.md +++ b/blog/2015/06/05/README.md @@ -14,15 +14,16 @@ For example, when I ran this code: 0CE0:0106 -g -the following "text" appeared at the top of the screen, in 640x200 16-color graphics mode 0x0E: +the following "text" correctly appeared at the top of the screen, in 640x200 16-color graphics mode 0x0E: AX=0B01 BX=0000 CX=0000 DX=0000 SP=FFEE BP=0000 SI=0000 DI=0000 DS=0CE0 ES=0CE0 SS=0CE0 CS=0CE0 IP=0105 NV UP EI PL NZ NA PO NC 0CE0:0105 CC INT 3 - -When I typed "q", then "cls" and finally "dir", the screen filled with DOS directory contents. But as -soon as the screen started to scroll, the screen contents became garbled. Other EGA graphics modes, +And when I typed "q", then "cls" and finally "dir", the screen filled with DOS directory contents. + +But as soon as the screen started to scroll, the screen contents became garbled. Other EGA graphics modes, like 640x350 16-color mode 0x10, didn't have this problem. To investigate, I set a breakpoint in the IBM EGA ROM where the scrolling starts, at 0xC000:12EA (see p.130 of the diff --git a/devices/pc/machine/compaq/deskpro386/vga/2048kb/machine.xml b/devices/pc/machine/compaq/deskpro386/vga/2048kb/machine.xml index 1a50a8cb3..27af7e1f9 100644 --- a/devices/pc/machine/compaq/deskpro386/vga/2048kb/machine.xml +++ b/devices/pc/machine/compaq/deskpro386/vga/2048kb/machine.xml @@ -13,7 +13,7 @@ - + diff --git a/modules/pcjs/lib/video.js b/modules/pcjs/lib/video.js index 901a9dbdc..6e3c4c768 100644 --- a/modules/pcjs/lib/video.js +++ b/modules/pcjs/lib/video.js @@ -2320,7 +2320,10 @@ Card.prototype.setMemoryAccess = function(nAccess) var nReadAccess = nAccess & Card.ACCESS.READ.MASK; var fnReadByte = Card.ACCESS.afn[nReadAccess]; if (!fnReadByte) { - if (DEBUG && this.dbg) this.dbg.message("Card.setMemoryAccess(" + str.toHexWord(nAccess) + "): missing readByte handler"); + if (DEBUG && this.dbg) { + this.dbg.message("Card.setMemoryAccess(" + str.toHexWord(nAccess) + "): missing readByte handler"); + this.dbg.stopCPU(); // let's take a look + } if (nReadAccess & Card.ACCESS.READ.EVENODD) { fnReadByte = Card.ACCESS.afn[Card.ACCESS.READ.EVENODD]; } @@ -2328,7 +2331,10 @@ Card.prototype.setMemoryAccess = function(nAccess) var nWriteAccess = nAccess & Card.ACCESS.WRITE.MASK; var fnWriteByte = Card.ACCESS.afn[nWriteAccess]; if (!fnWriteByte) { - if (DEBUG && this.dbg) this.dbg.message("Card.setMemoryAccess(" + str.toHexWord(nAccess) + "): missing writeByte handler"); + if (DEBUG && this.dbg) { + this.dbg.message("Card.setMemoryAccess(" + str.toHexWord(nAccess) + "): missing writeByte handler"); + this.dbg.stopCPU(); // let's take a look + } if (nWriteAccess & Card.ACCESS.WRITE.EVENODD) { fnWriteByte = Card.ACCESS.afn[Card.ACCESS.WRITE.EVENODD]; }