When a 'state' file is passed as a URL parameter, that's supposed to override a machine's 'resume' setting, but if a 'state' file is passed as EITHER a computer parameter (the original XML-based method) OR as a machine parameter (a newer method that allows a web page to override certain XML settings), that is NOT supposed to override the 'resume' setting. This restores the ability of the DONKEY.BAS demo to BOTH define a state file AND allow the machine to be suspended and resumed. Additionally, a new-ish Video card property (offStartAddr), which was originally added for the EGA/VGA, was not properly initialized for other cards, so when we restored the display of a suspended machine with a CGA, nothing would be displayed, due to lots of NaN buffer address calculations.

This commit is contained in:
Jeff Parsons 2017-06-22 17:45:36 -07:00 • committed by Jeff Parsons
commit 0bd1be0df9
12 changed files with 1799 additions and 1779 deletions

View file

@ -363,6 +363,7 @@ class Card {
this.regCRTData = data[5];
this.nCRTCRegs = Card.CRTC.TOTAL_REGS;
this.asCRTCRegs = DEBUGGER? Card.CRTC.REGS : [];
this.offStartAddr = ((this.regCRTData[Card.CRTC.START_ADDR_HI] << 8) + this.regCRTData[Card.CRTC.START_ADDR_LO])|0;
if (nCard >= Video.CARD.EGA) {
this.nCRTCRegs = Card.CRTC.EGA.TOTAL_REGS;