More PC8080 skeleton bits
This commit is contained in:
parent
19b22d32d4
commit
a2d183ecfc
10 changed files with 896 additions and 3 deletions
135
modules/pc8080/lib/cpuops.js
Normal file
135
modules/pc8080/lib/cpuops.js
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
/**
|
||||
* @fileoverview Implements PC8080 opcode handlers.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-20
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
*
|
||||
* This file is part of PCjs, which is part of the JavaScript Machines Project (aka JSMachines)
|
||||
* at <http://jsmachines.net/> and <http://pcjs.org/>.
|
||||
*
|
||||
* PCjs is free software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation, either version 3
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
||||
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCjs. If not,
|
||||
* see <http://www.gnu.org/licenses/gpl.html>.
|
||||
*
|
||||
* You are required to include the above copyright notice in every source code file of every
|
||||
* copy or modified version of this work, and to display that copyright notice on every screen
|
||||
* that loads or runs any version of this software (see Computer.COPYRIGHT).
|
||||
*
|
||||
* Some PCjs files also attempt to load external resource files, such as character-image files,
|
||||
* ROM files, and disk image files. Those external resource files are not considered part of the
|
||||
* PCjs program for purposes of the GNU General Public License, and the author does not claim
|
||||
* any copyright as to their contents.
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
if (NODE) {
|
||||
var str = require("../../shared/lib/strlib");
|
||||
var Messages = require("./messages");
|
||||
var CPUDef = require("./CPUDef");
|
||||
}
|
||||
|
||||
/**
|
||||
* op=0x00 (NOP)
|
||||
*
|
||||
* @this {CPUSim}
|
||||
*/
|
||||
CPUDef.opNOP = function()
|
||||
{
|
||||
this.nStepCycles -= 4;
|
||||
};
|
||||
|
||||
/**
|
||||
* op=0x01 (LXI B,d16)
|
||||
*
|
||||
* @this {CPUSim}
|
||||
*/
|
||||
CPUDef.opLXIB = function()
|
||||
{
|
||||
this.regC = this.getPCByte();
|
||||
this.regB = this.getPCByte();
|
||||
this.nStepCycles -= 10;
|
||||
};
|
||||
|
||||
/*
|
||||
* This 256-entry array of opcode functions is at the heart of the CPU engine: stepCPU(n).
|
||||
*
|
||||
* It might be worth trying a switch() statement instead, to see how the performance compares,
|
||||
* but I suspect that would vary quite a bit across JavaScript engines; for now, I'm putting my
|
||||
* money on array lookup.
|
||||
*/
|
||||
CPUDef.aOps = [
|
||||
/* 0x00-0x03 */ CPUDef.opNOP, CPUDef.opLXIB, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x04-0x07 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x08-0x0B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x0C-0x0F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x10-0x13 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x14-0x17 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x18-0x1B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x1C-0x1F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x20-0x23 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x24-0x27 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x28-0x2B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x2C-0x2F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x30-0x33 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x34-0x37 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x38-0x3B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x3C-0x3F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x40-0x43 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x44-0x47 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x48-0x4B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x4C-0x4F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x50-0x53 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x54-0x57 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x58-0x5B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x5C-0x5F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x60-0x63 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x64-0x67 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x68-0x6B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x6C-0x6F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x70-0x73 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x74-0x77 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x78-0x7B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x7C-0x7F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x80-0x83 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x84-0x87 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x88-0x8B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x8C-0x8F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x90-0x93 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x94-0x97 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x98-0x9B */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0x9C-0x9F */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xA0-0xA3 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xA4-0xA7 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xA8-0xAB */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xAC-0xAF */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xB0-0xB3 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xB4-0xB7 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xB8-0xBB */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xBC-0xBF */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xC0-0xC3 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xC4-0xC7 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xC8-0xCB */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xCC-0xCF */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xD0-0xD3 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xD4-0xD7 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xD8-0xDB */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xDC-0xDF */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xE0-0xE3 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xE4-0xE7 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xE8-0xEB */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xEC-0xEF */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xF0-0xF3 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xF4-0xF7 */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xF8-0xFB */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP,
|
||||
/* 0xFC-0xFF */ CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP, CPUDef.opNOP
|
||||
];
|
||||
216
modules/pc8080/lib/video.js
Normal file
216
modules/pc8080/lib/video.js
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 Video component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-20
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
*
|
||||
* This file is part of PCjs, which is part of the JavaScript Machines Project (aka JSMachines)
|
||||
* at <http://jsmachines.net/> and <http://pcjs.org/>.
|
||||
*
|
||||
* PCjs is free software: you can redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License as published by the Free Software Foundation, either version 3
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* PCjs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
||||
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with PCjs. If not,
|
||||
* see <http://www.gnu.org/licenses/gpl.html>.
|
||||
*
|
||||
* You are required to include the above copyright notice in every source code file of every
|
||||
* copy or modified version of this work, and to display that copyright notice on every screen
|
||||
* that loads or runs any version of this software (see Computer.COPYRIGHT).
|
||||
*
|
||||
* Some PCjs files also attempt to load external resource files, such as character-image files,
|
||||
* ROM files, and disk image files. Those external resource files are not considered part of the
|
||||
* PCjs program for purposes of the GNU General Public License, and the author does not claim
|
||||
* any copyright as to their contents.
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
if (NODE) {
|
||||
var str = require("../../shared/lib/strlib");
|
||||
var web = require("../../shared/lib/weblib");
|
||||
var DumpAPI = require("../../shared/lib/dumpapi");
|
||||
var Component = require("../../shared/lib/component");
|
||||
var Memory = require("./memory");
|
||||
var Messages = require("./messages");
|
||||
var State = require("./state");
|
||||
}
|
||||
|
||||
/**
|
||||
* Video(parmsVideo, canvas, context, textarea, container)
|
||||
*
|
||||
* The Video component can be configured with the following (parmsVideo) properties:
|
||||
*
|
||||
* screenWidth: width of the screen canvas, in pixels
|
||||
* screenHeight: height of the screen canvas, in pixels
|
||||
* scale: true for font scaling, false (default) to center the display on the screen
|
||||
* aspect
|
||||
* rotate
|
||||
* addr
|
||||
* screenColor: background color of the screen canvas (default is black)
|
||||
*
|
||||
* @constructor
|
||||
* @extends Component
|
||||
* @param {Object} parmsVideo
|
||||
* @param {Object} [canvas]
|
||||
* @param {Object} [context]
|
||||
* @param {Object} [textarea]
|
||||
* @param {Object} [container]
|
||||
*/
|
||||
function Video(parmsVideo, canvas, context, textarea, container)
|
||||
{
|
||||
Component.call(this, "Video", parmsVideo, Video, Messages.VIDEO);
|
||||
}
|
||||
|
||||
Component.subclass(Video);
|
||||
|
||||
/**
|
||||
* Video.init()
|
||||
*
|
||||
* This function operates on every HTML element of class "video", extracting the
|
||||
* JSON-encoded parameters for the Video constructor from the element's "data-value"
|
||||
* attribute, invoking the constructor to create a Video component, and then binding
|
||||
* any associated HTML controls to the new component.
|
||||
*/
|
||||
Video.init = function()
|
||||
{
|
||||
var aeVideo = Component.getElementsByClass(document, PCJSCLASS, "video");
|
||||
for (var iVideo = 0; iVideo < aeVideo.length; iVideo++) {
|
||||
var eVideo = aeVideo[iVideo];
|
||||
var parmsVideo = Component.getComponentParms(eVideo);
|
||||
|
||||
var eCanvas = document.createElement("canvas");
|
||||
if (eCanvas === undefined || !eCanvas.getContext) {
|
||||
eVideo.innerHTML = "<br/>Missing <canvas> support. Please try a newer web browser.";
|
||||
return;
|
||||
}
|
||||
|
||||
eCanvas.setAttribute("class", PCJSCLASS + "-canvas");
|
||||
eCanvas.setAttribute("width", parmsVideo['screenWidth']);
|
||||
eCanvas.setAttribute("height", parmsVideo['screenHeight']);
|
||||
eCanvas.style.backgroundColor = parmsVideo['screenColor'];
|
||||
|
||||
/*
|
||||
* The "contenteditable" attribute on a canvas element NOTICEABLY slows down canvas drawing on
|
||||
* Safari as soon as you give the canvas focus (ie, click away from the canvas, and drawing speeds
|
||||
* up; click on the canvas, and drawing slows down). So the "transparent textarea hack" that we
|
||||
* once employed as only a work-around for Android devices is now our default.
|
||||
*
|
||||
* eCanvas.setAttribute("contenteditable", "true");
|
||||
*
|
||||
* HACK: A canvas style of "auto" provides for excellent responsive canvas scaling in EVERY browser
|
||||
* except IE9/IE10, so I recalculate the appropriate CSS height every time the parent DIV is resized;
|
||||
* IE11 works without this hack, so we take advantage of the fact that IE11 doesn't identify as "MSIE".
|
||||
*
|
||||
* The other reason it's good to keep this particular hack limited to IE9/IE10 is that most other
|
||||
* browsers don't actually support an 'onresize' handler on anything but the window object.
|
||||
*/
|
||||
eCanvas.style.height = "auto";
|
||||
if (web.getUserAgent().indexOf("MSIE") >= 0) {
|
||||
eVideo.onresize = function(eParent, eChild, cx, cy) {
|
||||
return function onResizeVideo() {
|
||||
eChild.style.height = (((eParent.clientWidth * cy) / cx) | 0) + "px";
|
||||
};
|
||||
}(eVideo, eCanvas, parmsVideo['screenWidth'], parmsVideo['screenHeight']);
|
||||
eVideo.onresize();
|
||||
}
|
||||
/*
|
||||
* The following is a related hack that allows the user to force the machine to use a particular aspect
|
||||
* ratio if an 'aspect' URL parameter is set. Initially, it's just for testing purposes until we figure
|
||||
* out a better UI. And note that we use our web.onPageEvent() helper function to make sure we don't
|
||||
* trample any other 'onresize' handler(s) attached to the window object.
|
||||
*/
|
||||
var aspect = +Component.parmsURL['aspect'];
|
||||
/*
|
||||
* No 'aspect' parameter yields NaN, which is falsey, and anything else must satisfy my arbitrary
|
||||
* constraints of 0.3 <= aspect <= 3.33, to prevent any useless (or worse, browser-blowing) results.
|
||||
*/
|
||||
if (aspect && aspect >= 0.3 && aspect <= 3.33) {
|
||||
web.onPageEvent('onresize', function(eParent, eChild, aspectRatio) {
|
||||
return function onResizeWindow() {
|
||||
/*
|
||||
* Since aspectRatio is the target width/height, we have:
|
||||
*
|
||||
* eParent.clientWidth / eChild.style.height = aspectRatio
|
||||
*
|
||||
* which means that:
|
||||
*
|
||||
* eChild.style.height = eParent.clientWidth / aspectRatio
|
||||
*
|
||||
* so for example, if aspectRatio is 16:9, or 1.78, and clientWidth = 640,
|
||||
* then the calculated height should approximately 360.
|
||||
*/
|
||||
eChild.style.height = ((eParent.clientWidth / aspectRatio)|0) + "px";
|
||||
};
|
||||
}(eVideo, eCanvas, aspect));
|
||||
window['onresize']();
|
||||
}
|
||||
eVideo.appendChild(eCanvas);
|
||||
|
||||
/*
|
||||
* HACK: Android-based browsers, like the Silk (Amazon) browser and Chrome for Android, don't honor the
|
||||
* "contenteditable" attribute; that is, when the canvas receives focus, they don't activate the on-screen
|
||||
* keyboard. So my fallback is to create a transparent textarea on top of the canvas.
|
||||
*
|
||||
* The parent DIV must have a style of "position:relative" (alternatively, a class of "pcjs-container"),
|
||||
* so that we can position the textarea using absolute coordinates. Also, we don't want the textarea to be
|
||||
* visible, but we must use "opacity:0" instead of "visibility:hidden", because the latter seems to prevent
|
||||
* the element from receiving events. These styling requirements are taken care of in components.css
|
||||
* (see references to the "pcjs-video-object" class).
|
||||
*
|
||||
* UPDATE: Unfortunately, Android keyboards like to compose whole words before transmitting any of the
|
||||
* intervening characters; our textarea's keyDown/keyUp event handlers DO receive intervening key events,
|
||||
* but their keyCode property is ZERO. Virtually the only usable key event we receive is the Enter key.
|
||||
* Android users will have to use machines that include their own on-screen "soft keyboard", or use an
|
||||
* external keyboard.
|
||||
*
|
||||
* The following attempt to use a password-enabled input field didn't work any better on Android. You could
|
||||
* clearly see the overlaid semi-transparent input field, but none of the input characters were passed along,
|
||||
* with the exception of the "Go" (Enter) key.
|
||||
*
|
||||
* var eInput = document.createElement("input");
|
||||
* eInput.setAttribute("type", "password");
|
||||
* eInput.setAttribute("style", "position:absolute; left:0; top:0; width:100%; height:100%; opacity:0.5");
|
||||
* eVideo.appendChild(eInput);
|
||||
*
|
||||
* See this Chromium issue for more information: https://code.google.com/p/chromium/issues/detail?id=118639
|
||||
*/
|
||||
var eTextArea = document.createElement("textarea");
|
||||
|
||||
/*
|
||||
* As noted in keyboard.js, the keyboard on an iOS device tends to pop up with the SHIFT key depressed,
|
||||
* which is not the initial keyboard state that the Keyboard component expects, so hopefully turning off
|
||||
* these "auto" attributes will help.
|
||||
*/
|
||||
if (web.isUserAgent("iOS")) {
|
||||
eTextArea.setAttribute("autocapitalize", "off");
|
||||
eTextArea.setAttribute("autocorrect", "off");
|
||||
}
|
||||
eVideo.appendChild(eTextArea);
|
||||
|
||||
/*
|
||||
* Now we can create the Video object, record it, and wire it up to the associated document elements.
|
||||
*/
|
||||
var eContext = eCanvas.getContext("2d");
|
||||
var video = new Video(parmsVideo, eCanvas, eContext, eTextArea /* || eInput */, eVideo);
|
||||
|
||||
/*
|
||||
* Bind any video-specific controls (eg, the Refresh button). There are no essential controls, however;
|
||||
* even the "Refresh" button is just a diagnostic tool, to ensure that the screen contents are up-to-date.
|
||||
*/
|
||||
Component.bindComponentControls(video, eVideo, PCJSCLASS);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize every Video module on the page.
|
||||
*/
|
||||
web.onInit(Video.init);
|
||||
|
||||
if (NODE) module.exports = Video;
|
||||
|
|
@ -110,6 +110,7 @@ function Memory(addr, used, size, type, controller, cpu)
|
|||
this.controller = null;
|
||||
this.cpu = cpu; // if a CPU reference is provided, then this must be an UNPAGED Memory block allocation
|
||||
this.copyBreakpoints(); // initialize the block's Debugger info (eg, breakpoint totals); the caller will reinitialize
|
||||
|
||||
/*
|
||||
* TODO: Study the impact of dirty block tracking. As noted in the paged block handlers (eg, writeBytePLE),
|
||||
* the original purposes were to allow saveMemory() to save only dirty blocks, and to enable the Video component
|
||||
|
|
|
|||
Loading…
Reference in a new issue