Merge branch 'next-release'
This commit is contained in:
commit
c54a27e2e5
434 changed files with 18628 additions and 3770 deletions
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview PCjs Build Options
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Feb-10
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs Computer component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-15
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -253,7 +250,7 @@ C1PComputer.power = function(computer)
|
|||
/*
|
||||
* C1PComputer.init()
|
||||
*
|
||||
* This function operates on every HTML element of class "computer", extracting the
|
||||
* This function operates on every HTML element of class "c1pjs-computer", extracting the
|
||||
* JSON-encoded parameters for the C1PComputer constructor from the element's "data-value"
|
||||
* attribute, invoking the constructor to create a C1PComputer component, and then binding
|
||||
* any associated HTML controls to the new component.
|
||||
|
|
@ -263,7 +260,7 @@ C1PComputer.init = function()
|
|||
/*
|
||||
* In non-COMPILED builds, embedMachine() may have set XMLVERSION.
|
||||
*/
|
||||
if (!COMPILED && C1PJS.XMLVERSION) C1PJS.APPVERSION = C1PJS.XMLVERSION;
|
||||
if (!COMPILED && XMLVERSION) C1PJS.APPVERSION = XMLVERSION;
|
||||
|
||||
var aeComputers = Component.getElementsByClass(document, C1PJS.APPCLASS, "computer");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs 6502 CPU component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-15
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs Debugger component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-21
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview C1Pjs-specific compile-time definitions.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2014-May-08
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs DiskController component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Aug-09
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs Keyboard component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-20
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Compile-time definitions for Debugger-less configurations.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2014-May-08
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs Panel component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-19
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs RAM component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-15
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs ROM component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-15
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs SerialPort component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jul-01
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file implements the C1Pjs Video component
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-15
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Converts disk images to/from JSON
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a> (@jeffpar)
|
||||
* @version 1.0
|
||||
* Created 2014-02-01
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Converts file contents to JSON
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a> (@jeffpar)
|
||||
* @version 1.0
|
||||
* Created 2014-02-01
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -83,7 +80,7 @@ function FileDump(sFormat, fComments, fDecimal, offDump, nWidthDump, sServerRoot
|
|||
FileDump.sAPIURL = "http://www.pcjs.org" + DumpAPI.ENDPOINT;
|
||||
FileDump.sCopyright = "© 2012-2016 by Jeff Parsons (@jeffpar)";
|
||||
FileDump.sNotice = FileDump.sAPIURL + " " + FileDump.sCopyright;
|
||||
FileDump.sUsage = "Usage: " + FileDump.sAPIURL + "?" + DumpAPI.QUERY.FILE + "=({path}|{URL})&" + DumpAPI.QUERY.FORMAT + "=(json|data|hex|bytes|rom)";
|
||||
FileDump.sUsage = "Usage: " + FileDump.sAPIURL + "?" + DumpAPI.QUERY.FILE + "=({path}|{URL})&" + DumpAPI.QUERY.FORMAT + "=(json|data|hex|octal|bytes|words|rom)";
|
||||
|
||||
FileDump.asBadExts = [
|
||||
"js", "log"
|
||||
|
|
@ -100,15 +97,25 @@ FileDump.asBadExts = [
|
|||
*
|
||||
* Usage
|
||||
* ---
|
||||
* filedump --file=({path}|{URL}) [--merge=({path}|{url})] [--format=(json|data|hex|bytes|rom)] [--comments]
|
||||
* [--decimal] [--offset={number}] [--width={number}] [--output={path}] [--overwrite]
|
||||
* filedump --file=({path}|{URL}) [--merge=({path}|{url})] [--format=(json|data|hex|octal|bytes|words|rom)]
|
||||
* [--comments] [--decimal] [--offset={number}] [--width={number}] [--output={path}] [--overwrite]
|
||||
*
|
||||
* Arguments
|
||||
* ---
|
||||
* The default format is "json", which generates an array of signed 32-bit decimal values; "hex" is an older
|
||||
* text format that consists entirely of 2-character hex values (deprecated), and "bytes" is a JSON-like format
|
||||
* that also uses hex values (but with "0x" prefixes) and is normally used only when comments are enabled (use
|
||||
* --decimal to force decimal byte output).
|
||||
* --decimal to force decimal byte output). "words" are like "bytes" except that it outputs 16-bit values
|
||||
* instead of 8-bit values; "octal" is an alias for "words", the only difference being that it includes a comment
|
||||
* alongside each word with the octal form of the word.
|
||||
*
|
||||
* If you want actual octal output, then an --octal option should be added at some point; however, that begs the
|
||||
* question of how to render octal numbers so that all versions of JavaScript interpret them correctly. Prefixing
|
||||
* octal values with an extra zero was the old convention, but it was never formally adopted and it isn't allowed
|
||||
* in "strict" mode. Prefixing them with "0o" is the new convention for ES6 and up, which is great, but we still
|
||||
* have no octal format that works across the board. We can use the new octal format in code, because we always
|
||||
* compile browser-based code back to ES5 (converting all numeric constants to decimal), and current versions of
|
||||
* Node supported the new format for quite a while. But what we store in data files is more problematic.
|
||||
*
|
||||
* When a second file is "merged", the first file sets all even bytes and the second file sets all odd bytes.
|
||||
* In fact, any number of files can be merged: if there are N files, file #1 sets bytes at "offset mod N == 0",
|
||||
|
|
@ -136,7 +143,7 @@ FileDump.CLI = function()
|
|||
var args = proc.getArgs();
|
||||
|
||||
if (!args.argc) {
|
||||
console.log("usage: filedump --file=({path}|{URL}) [--merge=({path}|{url})] [--format=(json|data|hex|bytes|rom)] [--comments] [--decimal] [--offset={number}] [--width={number}] [--output={path}] [--overwrite]");
|
||||
console.log("usage: filedump --file=({path}|{URL}) [--merge=({path}|{url})] [--format=(json|data|hex|octal|bytes|words|rom)] [--comments] [--decimal] [--offset={number}] [--width={number}] [--output={path}] [--overwrite]");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -242,9 +249,12 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done)
|
|||
{
|
||||
var obj = this;
|
||||
|
||||
var encoding = null;
|
||||
var sExt = str.getExtension(sFile);
|
||||
var options = {encoding: sExt == DumpAPI.FORMAT.JSON || sExt == DumpAPI.FORMAT.HEX? "utf8" : null};
|
||||
|
||||
if (sExt == DumpAPI.FORMAT.JSON || sExt == DumpAPI.FORMAT.HEX || sExt == "lst") {
|
||||
encoding = "utf8";
|
||||
}
|
||||
var options = {encoding: encoding};
|
||||
var sFilePath = (this.fLocal || net.isRemote(sFile))? sFile : path.join(this.sServerRoot, sFile);
|
||||
|
||||
if (!this.sFilePath) this.sFilePath = sFilePath;
|
||||
|
|
@ -257,7 +267,7 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done)
|
|||
done(err);
|
||||
return;
|
||||
}
|
||||
obj.setData(buf, iStart, nSkip);
|
||||
obj.setData(buf, iStart, nSkip, sExt);
|
||||
done(null);
|
||||
});
|
||||
} else {
|
||||
|
|
@ -267,14 +277,58 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done)
|
|||
done(err);
|
||||
return;
|
||||
}
|
||||
obj.setData(buf, iStart, nSkip);
|
||||
obj.setData(buf, iStart, nSkip, sExt);
|
||||
done(null);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* setData(buf, iStart, nSkip)
|
||||
* parseListing(sListing)
|
||||
*
|
||||
* Parses the data within a MACRO11 listing file and produces an array of bytes.
|
||||
*
|
||||
* @this {FileDump}
|
||||
* @param {string} sListing
|
||||
* @return {Array.<number>}
|
||||
*/
|
||||
FileDump.prototype.parseListing = function(sListing)
|
||||
{
|
||||
var ab = [];
|
||||
var matchLine;
|
||||
var re = /^( [0-9 ]{8}|)([0-7]{6})[: ]+([0-7]+)[ ]*([0-7']+|)[ ]+([0-7']+|)[ ]+(.*)$/gm;
|
||||
var addrStart = null;
|
||||
while (matchLine = re.exec(sListing)) {
|
||||
/*
|
||||
* matchLine[1]: line # (optional)
|
||||
* matchLine[2]: address
|
||||
* matchLine[3]: 6-digit opcode or 3-digit data
|
||||
* matchLine[4]: 6-digit operand (with optional apostrophe) or 3-digit data
|
||||
* matchLine[5]: 6-digit operand (with optional apostrophe) or 3-digit data
|
||||
*/
|
||||
var addrLine = parseInt(matchLine[2], 8);
|
||||
if (addrStart == null) addrStart = addrLine;
|
||||
for (var i = 3, s; i <= 5 && (s = matchLine[i]); i++) {
|
||||
var data = parseInt(s.substr(0, 6), 8);
|
||||
if (s.length == 3) {
|
||||
addrLine++;
|
||||
ab.push(data);
|
||||
}
|
||||
else {
|
||||
addrLine += 2;
|
||||
if (s.length == 7) {
|
||||
data -= addrLine;
|
||||
}
|
||||
ab.push(data & 0xff);
|
||||
ab.push(data >> 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ab;
|
||||
};
|
||||
|
||||
/**
|
||||
* setData(buf, iStart, nSkip, sExt)
|
||||
*
|
||||
* Records the given file data in the FileDump's buffer
|
||||
*
|
||||
|
|
@ -282,13 +336,17 @@ FileDump.prototype.loadFile = function(sFile, iStart, nSkip, done)
|
|||
* @param {Buffer|string} buf
|
||||
* @param {number} iStart
|
||||
* @param {number} nSkip
|
||||
* @param {string} [sExt]
|
||||
*/
|
||||
FileDump.prototype.setData = function(buf, iStart, nSkip)
|
||||
FileDump.prototype.setData = function(buf, iStart, nSkip, sExt)
|
||||
{
|
||||
var b, i, j, s;
|
||||
if (typeof buf == "string") {
|
||||
var ab = [];
|
||||
if (buf.indexOf('{') >= 0) {
|
||||
if (sExt == "lst") {
|
||||
ab = this.parseListing(buf);
|
||||
}
|
||||
else if (buf.indexOf('{') >= 0) {
|
||||
/*
|
||||
* Treat the incoming string data as JSON data.
|
||||
*/
|
||||
|
|
@ -324,7 +382,6 @@ FileDump.prototype.setData = function(buf, iStart, nSkip)
|
|||
* If we didn't recognize the data, then simply return, leaving this.buf undefined.
|
||||
*/
|
||||
if (!ab.length) return;
|
||||
|
||||
buf = new Buffer(ab);
|
||||
}
|
||||
if (!this.buf) {
|
||||
|
|
@ -409,6 +466,12 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth
|
|||
{
|
||||
var chOpen = '', chClose = '', chSep = ' ', sHexPrefix = "";
|
||||
|
||||
var nBase = 16;
|
||||
if (sKey == DumpAPI.FORMAT.OCTAL) {
|
||||
sKey = DumpAPI.FORMAT.WORDS;
|
||||
nBase = 8;
|
||||
}
|
||||
|
||||
this.sKey = sKey;
|
||||
|
||||
if (this.sFormat != DumpAPI.FORMAT.HEX) {
|
||||
|
|
@ -422,7 +485,7 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth
|
|||
|
||||
var sLine = "";
|
||||
var sASCII = "";
|
||||
var cMaxCols = nWidthDump * cbItem;
|
||||
var cMaxCols = nWidthDump * (cbItem == 2 && nBase == 8? 1 : cbItem);
|
||||
|
||||
for (var off = offDump; off < len; off += cbItem) {
|
||||
|
||||
|
|
@ -434,7 +497,7 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth
|
|||
break;
|
||||
}
|
||||
|
||||
var v = (cbItem == 1? buf.readUInt8(off) : buf.readInt32LE(off));
|
||||
var v = (cbItem == 1? buf.readUInt8(off) : (cbItem == 2? buf.readInt16LE(off) : buf.readInt32LE(off)));
|
||||
|
||||
if (off > offDump) {
|
||||
sLine += chSep;
|
||||
|
|
@ -444,7 +507,11 @@ FileDump.prototype.dumpBuffer = function(sKey, buf, len, cbItem, offDump, nWidth
|
|||
}
|
||||
}
|
||||
if (cbItem > 1) {
|
||||
sLine += v;
|
||||
if (cbItem > 2) {
|
||||
sLine += v;
|
||||
} else {
|
||||
sLine += str.toHexWord(v) + (nBase == 8? " /*" + str.toOct(v & 0xffff, 6) + "*/" : "");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (this.fDecimal) {
|
||||
|
|
@ -665,6 +732,9 @@ FileDump.prototype.buildJSON = function()
|
|||
// console.log("length of buffer: " + this.buf.length);
|
||||
if (this.fJSONComments || this.sFormat == DumpAPI.FORMAT.HEX || this.sFormat == DumpAPI.FORMAT.BYTES) {
|
||||
this.json += this.dumpBuffer(null, this.buf, this.buf.length, 1);
|
||||
}
|
||||
else if (this.sFormat == DumpAPI.FORMAT.OCTAL || this.sFormat == DumpAPI.FORMAT.WORDS) {
|
||||
this.json += this.dumpBuffer(this.sFormat, this.buf, this.buf.length, 2);
|
||||
} else {
|
||||
this.json += this.dumpBuffer("data", this.buf, this.buf.length, 4);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Pre-process JavaScript file(s) with well-defined constants inlined
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a> (@jeffpar)
|
||||
* @version 1.1
|
||||
* Created 2014-Mar-22
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Builds default ("index.html") documents from HTML templates
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a> (@jeffpar)
|
||||
* @version 1.0
|
||||
* Created 2014-02-14
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -799,7 +796,7 @@ HTMLOut.prototype.setData = function(err, sData, sFile, fTemplate)
|
|||
* We cheat slightly and insert one of those tokens right now, because otherwise
|
||||
* the template file itself would not render correctly in your web browser.
|
||||
*/
|
||||
this.sTemplate = sData.replace("/modules/shared/templates/common.css", "/versions/pcx86/<!-- pcjs:version -->/common.css");
|
||||
this.sTemplate = sData; // .replace("/modules/shared/templates/common.css", "/versions/pcx86/<!-- pcjs:version -->/common.css");
|
||||
this.sHTML = this.sTemplate;
|
||||
|
||||
/*
|
||||
|
|
@ -1846,7 +1843,7 @@ HTMLOut.prototype.getRandomString = function(sIndent)
|
|||
*
|
||||
* At a minimum, each machine object should contain the following properties:
|
||||
*
|
||||
* 'type' (eg, a machine type, such as "PCx86" or "C1P")
|
||||
* 'type' (eg, a machine type, such as "C1P", "PCx86", "PC8080", or "PDP11")
|
||||
* 'version' (eg, "1.10", "*" to select the current version, or "uncompiled"; "*" is the default)
|
||||
* 'debugger' (eg, true or false; false is the default)
|
||||
*
|
||||
|
|
@ -1894,7 +1891,7 @@ HTMLOut.prototype.processMachines = function(aMachines, buildOptions, done)
|
|||
if (fCompiled) {
|
||||
var sScriptName = sType.toLowerCase();
|
||||
var sScriptFile = sScriptName + (fDebugger? "-dbg" : "") + ".js";
|
||||
var sScriptFolder = sScriptName + ((sType == "C1P" || sType == "PC")? "js" : "");
|
||||
var sScriptFolder = sScriptName == "c1p"? "c1pjs" : (sScriptName.substr(0, 3) == "pdp"? "pdpjs" : sScriptName);
|
||||
asFiles.push("/versions/" + sScriptFolder + "/" + sVersion + "/components.css");
|
||||
asFiles.push("/versions/" + sScriptFolder + "/" + sVersion + "/" + sScriptFile);
|
||||
this.addFilesToHTML(asFiles, sScriptEmbed);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Handles API requests and redirects
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a> (@jeffpar)
|
||||
* @version 1.0
|
||||
* Created 2014-02-14
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Parses simplified Markdown files
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a> (@jeffpar)
|
||||
* @version 1.0
|
||||
* Created 2014-02-14
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 Bus component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 Computer component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Controls the PC6502 CPU component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Defines PC6502 CPU constants.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements PC6502 opcode handlers.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 CPU component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 Debugger component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview PC6502-specific compile-time definitions.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 Keyboard component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 Memory component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Defines message categories.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Compile-time definitions for Debugger-less configurations.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 Panel component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 RAM component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 ROM component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview The State class used by PCjs machines.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC6502 Video component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 Bus component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-18
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 ChipSet component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-25
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 Computer component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-18
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -1488,7 +1485,7 @@ Computer8080.prototype.updateVideo = function(fForced)
|
|||
/**
|
||||
* Computer8080.init()
|
||||
*
|
||||
* For every machine represented by an HTML element of class "pcjs-machine", this function
|
||||
* For every machine represented by an HTML element of class "pc8080-machine", this function
|
||||
* locates the HTML element of class "computer", extracting the JSON-encoded parameters for the
|
||||
* Computer constructor from the element's "data-value" attribute, invoking the constructor to
|
||||
* create a Computer component, and then binding any associated HTML controls to the new component.
|
||||
|
|
@ -1498,7 +1495,7 @@ Computer8080.init = function()
|
|||
/*
|
||||
* In non-COMPILED builds, embedMachine() may have set XMLVERSION.
|
||||
*/
|
||||
if (!COMPILED && PC8080.XMLVERSION) PC8080.APPVERSION = PC8080.XMLVERSION;
|
||||
if (!COMPILED && XMLVERSION) PC8080.APPVERSION = XMLVERSION;
|
||||
|
||||
var aeMachines = Component.getElementsByClass(document, PC8080.APPCLASS + "-machine");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Controls the PC8080 CPU component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-18
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -976,7 +973,13 @@ CPU8080.prototype.setTimer = function(iTimer, ms, fReset)
|
|||
if (iTimer >= 0 && iTimer < this.aTimers.length) {
|
||||
if (fReset || this.aTimers[iTimer][0] < 0) {
|
||||
nCycles = this.getMSCycles(ms);
|
||||
this.aTimers[iTimer][0] = nCycles;
|
||||
/*
|
||||
* We must now confront the following problem: if the CPU is currently executing a burst of cycles,
|
||||
* the number of cycles it has executed in that burst so far must NOT be charged against the cycle
|
||||
* timeout we're about to set. The simplest way to resolve that is to immediately call endBurst()
|
||||
* and bias the above cycle timeout by the number of cycles that the burst executed.
|
||||
*/
|
||||
this.aTimers[iTimer][0] = nCycles + this.endBurst();
|
||||
}
|
||||
}
|
||||
return nCycles;
|
||||
|
|
@ -1039,14 +1042,18 @@ CPU8080.prototype.updateTimers = function(nCycles)
|
|||
};
|
||||
|
||||
/**
|
||||
* endBurst()
|
||||
* endBurst(fReset)
|
||||
*
|
||||
* @this {CPU8080}
|
||||
* @param {boolean} [fReset]
|
||||
* @return {number} (number of cycles executed in the most recent burst)
|
||||
*/
|
||||
CPU8080.prototype.endBurst = function()
|
||||
CPU8080.prototype.endBurst = function(fReset)
|
||||
{
|
||||
this.nBurstCycles -= this.nStepCycles;
|
||||
var nCycles = this.nBurstCycles -= this.nStepCycles;
|
||||
this.nStepCycles = 0;
|
||||
if (fReset) this.nBurstCycles = 0;
|
||||
return nCycles;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1074,35 +1081,34 @@ CPU8080.prototype.runCPU = function(fUpdateFocus)
|
|||
try {
|
||||
do {
|
||||
/*
|
||||
* nCyclesPerBurst is how many cycles we WANT to run on each iteration of stepCPU(), and may
|
||||
* be as HIGH as nCyclesPerYield, but it may be significantly less. getBurstCycles() will adjust
|
||||
* nCyclesPerBurst downward if any CPU timers need to fire during the next burst.
|
||||
* nCycles is how many cycles we WANT to run on each iteration of stepCPU(), and may be as
|
||||
* HIGH as nCyclesPerYield, but it may be significantly less. getBurstCycles() will adjust
|
||||
* nCycles downward if any CPU timers need to fire during the next burst.
|
||||
*/
|
||||
var nCyclesPerBurst = this.getBurstCycles(this.flags.checksum? 1 : this.nCyclesPerYield);
|
||||
var nCycles = this.getBurstCycles(this.flags.checksum? 1 : this.nCyclesPerYield);
|
||||
|
||||
/*
|
||||
* Execute the burst.
|
||||
*/
|
||||
this.stepCPU(nCyclesPerBurst);
|
||||
this.stepCPU(nCycles);
|
||||
|
||||
/*
|
||||
* nCycles is how many cycles stepCPU() actually ran (nBurstCycles less any remaining nStepCycles).
|
||||
* Terminate the burst, returning the number of cycles that stepCPU() actually ran.
|
||||
*/
|
||||
var nCycles = this.nBurstCycles - this.nStepCycles;
|
||||
|
||||
/*
|
||||
* Update any/all timers, firing those whose cycle countdowns have reached (or dropped below) zero.
|
||||
*/
|
||||
this.updateTimers(nCycles);
|
||||
nCycles = this.endBurst(true);
|
||||
|
||||
/*
|
||||
* Add nCycles to nCyclesThisRun, as well as nRunCycles (the cycle count since the CPU first started).
|
||||
*/
|
||||
this.nCyclesThisRun += nCycles;
|
||||
this.nRunCycles += nCycles;
|
||||
this.addCycles(0, true);
|
||||
this.updateChecksum(nCycles);
|
||||
|
||||
/*
|
||||
* Update any/all timers, firing those whose cycle countdowns have reached (or dropped below) zero.
|
||||
*/
|
||||
this.updateTimers(nCycles);
|
||||
|
||||
this.nCyclesNextYield -= nCycles;
|
||||
if (this.nCyclesNextYield <= 0) {
|
||||
this.nCyclesNextYield += this.nCyclesPerYield;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Defines PC8080 CPU constants.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-18
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @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>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 CPU component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-18
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 Debugger component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-18
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview PC8080-specific compile-time definitions.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-18
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 Keyboard component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-19
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 Memory component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-18
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Defines message categories.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-18
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Compile-time definitions for Debugger-less configurations.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-May-12
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 Panel component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-19
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 RAM component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-19
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 ROM component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Apr-19
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PC8080 SerialPort component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Aug-08
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @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>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview This file generates PCjs 8086 mode-byte decoders.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-08
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 Bus component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-04
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 ChipSet component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-14
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -813,7 +810,7 @@ ChipSet.DIPSW[ChipSet.MODEL_5150][0][ChipSet.SWITCH_TYPE.FPU] = {
|
|||
0: 0x00, // 0 means an FPU is NOT installed
|
||||
1: 0x02 // 1 means an FPU is installed
|
||||
},
|
||||
LABEL: "Coprocessor"
|
||||
LABEL: "FPU"
|
||||
};
|
||||
ChipSet.DIPSW[ChipSet.MODEL_5150][0][ChipSet.SWITCH_TYPE.MONITOR] = {
|
||||
MASK: 0x30,
|
||||
|
|
@ -913,7 +910,7 @@ ChipSet.DIPSW[ChipSet.MODEL_ATT_6300][0][ChipSet.SWITCH_TYPE.FPU] = {
|
|||
0: 0x00,
|
||||
1: 0x10
|
||||
},
|
||||
LABEL: "Coprocessor"
|
||||
LABEL: "FPU"
|
||||
};
|
||||
ChipSet.DIPSW[ChipSet.MODEL_ATT_6300][1][ChipSet.SWITCH_TYPE.FLOPTYPE] = {
|
||||
MASK: 0x01,
|
||||
|
|
@ -2812,7 +2809,7 @@ ChipSet.prototype.updateDIPSwitchDescriptions = function()
|
|||
3: "Monochrome"
|
||||
};
|
||||
sText += this.getDIPMemorySize(true) + "Kb";
|
||||
sText += ", " + (+this.getDIPCoprocessor(true)? "" : "No ") + "Coprocessor";
|
||||
sText += ", " + (+this.getDIPCoprocessor(true)? "" : "No ") + "FPU";
|
||||
sText += ", " + asMonitorTypes[this.getDIPVideoMonitor(true)] + " Monitor";
|
||||
sText += ", " + this.getDIPFloppyDrives(true) + " Floppy Drives";
|
||||
if (this.aDIPSwitches[0][1] != null && this.aDIPSwitches[0][1] != this.aDIPSwitches[0][0] ||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 Computer component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-15
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -1518,7 +1515,7 @@ Computer.prototype.updateVideo = function(fForce)
|
|||
/**
|
||||
* Computer.init()
|
||||
*
|
||||
* For every machine represented by an HTML element of class "pcjs-machine", this function
|
||||
* For every machine represented by an HTML element of class "pcx86-machine", this function
|
||||
* locates the HTML element of class "computer", extracting the JSON-encoded parameters for the
|
||||
* Computer constructor from the element's "data-value" attribute, invoking the constructor to
|
||||
* create a Computer component, and then binding any associated HTML controls to the new component.
|
||||
|
|
@ -1528,7 +1525,7 @@ Computer.init = function()
|
|||
/*
|
||||
* In non-COMPILED builds, embedMachine() may have set XMLVERSION.
|
||||
*/
|
||||
if (!COMPILED && PCX86.XMLVERSION) PCX86.APPVERSION = PCX86.XMLVERSION;
|
||||
if (!COMPILED && XMLVERSION) PCX86.APPVERSION = XMLVERSION;
|
||||
|
||||
var aeMachines = Component.getElementsByClass(document, PCX86.APPCLASS + "-machine");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 CPU component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-04
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -102,7 +99,7 @@ function CPU(parmsCPU, nCyclesDefault)
|
|||
this.flags.autoStart = parmsCPU['autoStart'];
|
||||
|
||||
/*
|
||||
* TODO: Add some UI for fDisplayLiveRegs (either an XML property, or a UI checkbox, or both)
|
||||
* TODO: Add some UI for displayLiveRegs (either an XML property, or a UI checkbox, or both)
|
||||
*/
|
||||
this.flags.displayLiveRegs = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 Debugger component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-21
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview PCx86-specific compile-time definitions.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2014-May-08
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements disk image support for both FDC and HDC.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Nov-26
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 Floppy Drive Controller (FDC) component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Aug-09
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 Hard Drive Controller (HDC) component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Nov-26
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview PCx86-specific BIOS/DOS interrupt definitions.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2014-Dec-11
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 Keyboard component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-20
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 "physical" Memory component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-04
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Defines message categories.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2014-Dec-11
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 Mouse component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jul-01
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Compile-time definitions for Debugger-less configurations.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2014-May-08
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 Panel component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-19
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 ParallelPort component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jul-01
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 RAM component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-15
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 ROM component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-15
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 SerialPort component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jul-01
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements the PCx86 Video component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Jun-15
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Defines PCx86 constants.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-05
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements PCx86 8086/8088 CPU logic.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-05
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements PCx86 8087 FPU logic.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2015-Nov-09
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements PCx86 8086 opcode helpers.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-05
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements PCx86 opcode helpers.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Mar-04
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements PCx86 general-purpose ModRegRM decoding.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Mar-06
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements PCx86 0x0F two-byte opcodes
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-05
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements PCx86 8086 opcode decoding.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2012-Sep-05
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Implements PCx86 X86 Segment Registers
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2014-Sep-10
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
|
|||
|
|
@ -5,14 +5,17 @@ permalink: /modules/pdp11/
|
|||
---
|
||||
|
||||
PDP-11 Machine Emulation Module (PDPjs)
|
||||
=========================================
|
||||
=======================================
|
||||
|
||||
Overview
|
||||
---
|
||||
PDPjs is our PDP-11 machine emulation module. The code is being adapted from
|
||||
the JavaScript [PDP 11/70 Emulator (v1.3)](http://skn.noip.me/pdp11/pdp11.html) written by
|
||||
the JavaScript [PDP 11/70 Emulator (v1.4)](http://skn.noip.me/pdp11/pdp11.html) written by
|
||||
[Paul Nankervis](mailto:paulnank@hotmail.com).
|
||||
|
||||
See the list of available [PDP-11 Machines](/devices/pdp11/machine/), which includes a
|
||||
[PDP-11/70 with Front Panel](/devices/pdp11/machine/1170/panel/) and [PDP-11/70 with VT100 Terminal](/devices/pdp11/machine/1170/vt100/).
|
||||
|
||||
PDPjs is currently comprised of the following non-shared components, as listed in
|
||||
[package.json](../../package.json) (see the *pdp11Files* property):
|
||||
|
||||
|
|
@ -20,6 +23,7 @@ PDPjs is currently comprised of the following non-shared components, as listed i
|
|||
* [messages.js](/modules/pdp11/lib/messages.js)
|
||||
* [panel.js](/modules/pdp11/lib/panel.js)
|
||||
* [bus.js](/modules/pdp11/lib/bus.js)
|
||||
* [device.js](/modules/pdp11/lib/device.js)
|
||||
* [memory.js](/modules/pdp11/lib/memory.js)
|
||||
* [cpu.js](/modules/pdp11/lib/cpu.js)
|
||||
* [cpustate.js](/modules/pdp11/lib/cpustate.js)
|
||||
|
|
@ -27,5 +31,6 @@ PDPjs is currently comprised of the following non-shared components, as listed i
|
|||
* [rom.js](/modules/pdp11/lib/rom.js)
|
||||
* [ram.js](/modules/pdp11/lib/ram.js)
|
||||
* [keyboard.js](/modules/pdp11/lib/keyboard.js)
|
||||
* [serialport.js](/modules/pdp11/lib/serialport.js)
|
||||
* [debugger.js](/modules/pdp11/lib/debugger.js)
|
||||
* [computer.js](/modules/pdp11/lib/computer.js)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
/**
|
||||
* @fileoverview Converts octal constants to hex.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Sep-04
|
||||
*
|
||||
* Copyright © 2012-2016 Jeff Parsons <Jeff@pcjs.org>
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
|
|
@ -19,9 +16,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -38,7 +35,7 @@ try {
|
|||
var asLines = sText.split('\n');
|
||||
for (var iLine = 0; iLine < asLines.length; iLine++) {
|
||||
var sLine = asLines[iLine];
|
||||
var match, re = /(^|[^0-9a-z_-]*)(0[0-7]+)([^0-9a-z_,]*|$)/gi;
|
||||
var match, re = /(^|[^0-9a-z_-])(0[0-7]+)([^0-9a-z_]|$)/gi;
|
||||
var iComment = sLine.indexOf("//");
|
||||
while (match = re.exec(sLine)) {
|
||||
if (iComment >= 0 && match.index > iComment) break;
|
||||
|
|
@ -47,14 +44,15 @@ try {
|
|||
console.log("found negative octal value (" + match[2] + "), skipping");
|
||||
continue;
|
||||
}
|
||||
var sReplace = match[1] + "0x" + ("0000" + n.toString(16).toUpperCase()).substr(-4) + match[3] + " /*" + match[2] + "*/";
|
||||
var cch = (n <= 255? 2 : (n <= 65535? 4 : 8));
|
||||
var sReplace = match[1] + "0x" + ("00000000" + n.toString(16).toUpperCase()).substr(-cch) + match[3] + " /*" + match[2] + "*/";
|
||||
sLine = sLine.substr(0, match.index) + sReplace + sLine.substr(match.index + match[0].length);
|
||||
re.lastIndex = match.index + sReplace.length;
|
||||
asLines[iLine] = sLine;
|
||||
}
|
||||
}
|
||||
sText = "";
|
||||
for (var iLine = 0; iLine < asLines.length; iLine++) {
|
||||
for (iLine = 0; iLine < asLines.length; iLine++) {
|
||||
if (sText) sText += '\n';
|
||||
sText += asLines[iLine];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
/**
|
||||
* @fileoverview Implements the PDP11 Bus component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Sep-03
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
||||
* may be used freely provided the original author name is acknowledged in any modified source code.
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of September 2016 at <http://skn.noip.me/pdp11/pdp11.html>. This code
|
||||
* may be used freely provided the original authors are acknowledged in any modified source code.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -21,9 +20,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -43,7 +42,7 @@ if (NODE) {
|
|||
}
|
||||
|
||||
/**
|
||||
* BusPDP11(cpu, dbg)
|
||||
* BusPDP11(parmsBus, cpu, dbg)
|
||||
*
|
||||
* The BusPDP11 component manages physical memory and I/O address spaces.
|
||||
*
|
||||
|
|
@ -70,12 +69,24 @@ function BusPDP11(parmsBus, cpu, dbg)
|
|||
this.cpu = cpu;
|
||||
this.dbg = dbg;
|
||||
|
||||
/*
|
||||
* Supported values for nBusWidth are 16 (default), 18, and 22. This represents the maximum size
|
||||
* of the bus for the life of the machine, regardless what memory management mode the CPU has enabled.
|
||||
*/
|
||||
this.nBusWidth = parmsBus['busWidth'] || 16;
|
||||
|
||||
/*
|
||||
* This controls the location of the IOPAGE (ie, at the top of 16-bit, 18-bit, or 22-bit address range).
|
||||
* It is managed by setIOPageRange(). reset() establishes the default (16).
|
||||
*/
|
||||
this.nIOPageRange = 0; // zero means no IOPAGE access (yet)
|
||||
this.prevIOPageBlocks = []; // this saves any memory blocks we had to replace with IOPAGE blocks
|
||||
this.realIOPageBlocks = null; // this saves the memory blocks allocated for IOPAGE, so we can reuse them
|
||||
|
||||
/*
|
||||
* Compute all BusPDP11 memory block parameters, based on the width of the bus. The entire
|
||||
* address space is divided into blocks, using a block size that is (hopefully) appropriate to
|
||||
* the bus width. The following table summarizes our simplistic calculations.
|
||||
* the bus width. The following table summarizes our (original) simplistic calculations:
|
||||
*
|
||||
* Bus Width Block Shift Block Size
|
||||
* --------- ----------- ----------
|
||||
|
|
@ -93,10 +104,19 @@ function BusPDP11(parmsBus, cpu, dbg)
|
|||
*/
|
||||
this.addrTotal = Math.pow(2, this.nBusWidth);
|
||||
this.nBusLimit = this.nBusMask = (this.addrTotal - 1) | 0;
|
||||
this.nBlockShift = (this.nBusWidth >> 1) + 2;
|
||||
if (this.nBlockShift < 10) this.nBlockShift = 10;
|
||||
if (this.nBlockShift > 15) this.nBlockShift = 15;
|
||||
this.nBlockSize = 1 << this.nBlockShift;
|
||||
|
||||
/*
|
||||
* WARNING: Instead of dynamically calculating nBlockShift based on nBusWidth, as described above, we
|
||||
* now force nBlockSize to IOPAGE_LENGTH, because that's what our IOController functions currently assume.
|
||||
*
|
||||
* this.nBlockShift = (this.nBusWidth >> 1) + 2;
|
||||
* if (this.nBlockShift < 10) this.nBlockShift = 10;
|
||||
* if (this.nBlockShift > 15) this.nBlockShift = 15;
|
||||
* this.nBlockSize = 1 << this.nBlockShift;
|
||||
*/
|
||||
this.nBlockSize = BusPDP11.IOPAGE_LENGTH;
|
||||
this.nBlockShift = Math.log2(this.nBlockSize); // ES6 ALERT (alternatively: Math.log(this.nBlockSize) / Math.LN2)
|
||||
|
||||
this.nBlockLen = this.nBlockSize >> 2;
|
||||
this.nBlockLimit = this.nBlockSize - 1;
|
||||
this.nBlockTotal = (this.addrTotal / this.nBlockSize) | 0;
|
||||
|
|
@ -117,26 +137,41 @@ function BusPDP11(parmsBus, cpu, dbg)
|
|||
* Memory access handlers must service the entire block; see the setAccess() function in the Memory
|
||||
* component for details.
|
||||
*
|
||||
* Finally, for debugging purposes, if an I/O address has a symbolic name, it will be saved here:
|
||||
*
|
||||
* [4]: symbolic name of I/O address
|
||||
*
|
||||
* UPDATE: The Debugger wants to piggy-back on these arrays to indicate addresses for which it wants
|
||||
* notification. In those cases, the following additional element will be set:
|
||||
*
|
||||
* [4]: true to break on I/O, false to ignore I/O
|
||||
* [5]: true to break on I/O, false to ignore I/O
|
||||
*
|
||||
* The false case is important if fIOBreakAll is set, because it allows the Debugger to selectively
|
||||
* ignore specific addresses.
|
||||
*
|
||||
* Finally, for debugging purposes, if an I/O address has a symbolic name, it will be saved here:
|
||||
*
|
||||
* [5]: symbolic name of I/O address
|
||||
*/
|
||||
this.aIOHandlers = [];
|
||||
this.fIOBreakAll = false;
|
||||
|
||||
this.fnReset = null;
|
||||
this.fnAccess = this.access;
|
||||
this.nDisableTraps = 0;
|
||||
|
||||
/*
|
||||
* Allocate empty Memory blocks to span the entire physical address space.
|
||||
* Array of RESET notification handlers registered by Device components.
|
||||
*/
|
||||
this.afnReset = [];
|
||||
|
||||
/*
|
||||
* Before we can add any memory blocks that declare our component as a custom memory controller,
|
||||
* we must initialize the array that the getControllerAccess() method supplies to the Memory component.
|
||||
*/
|
||||
this.afnIOPage = [
|
||||
BusPDP11.IOController.readByte,
|
||||
BusPDP11.IOController.writeByte,
|
||||
BusPDP11.IOController.readWord,
|
||||
BusPDP11.IOController.writeWord
|
||||
];
|
||||
|
||||
/*
|
||||
* We're ready to allocate empty Memory blocks to span the entire physical address space, including the
|
||||
* initial location of the IOPAGE.
|
||||
*/
|
||||
this.initMemory();
|
||||
|
||||
|
|
@ -145,14 +180,13 @@ function BusPDP11(parmsBus, cpu, dbg)
|
|||
|
||||
Component.subclass(BusPDP11);
|
||||
|
||||
BusPDP11.IOPAGE_VIRT = 0xE000; /*000160000*/
|
||||
BusPDP11.IOPAGE_16BIT = 0xE000; /*000160000*/ // eg, PDP-11/20
|
||||
BusPDP11.IOPAGE_18BIT = 0x3E000; /*000760000*/ // eg, PDP-11/45
|
||||
BusPDP11.IOPAGE_UNIBUS = 0x3C0000; /*017000000*/
|
||||
BusPDP11.IOPAGE_22BIT = 0x3FE000; /*017760000*/ // eg, PDP-11/70
|
||||
BusPDP11.IOPAGE_LENGTH = 0x2000; // ie, 8Kb
|
||||
BusPDP11.IOPAGE_MASK = BusPDP11.IOPAGE_LENGTH - 1;
|
||||
BusPDP11.MAX_MEMORY = BusPDP11.IOPAGE_UNIBUS - 16384; // Maximum memory address (need less memory for BSD 2.9 boot)
|
||||
BusPDP11.MAX_ADDRESS = 0x400000; /*020000000*/ // Register addresses are above 22 bit addressing
|
||||
|
||||
BusPDP11.ERROR = {
|
||||
RANGE_INUSE: 1,
|
||||
|
|
@ -161,19 +195,52 @@ BusPDP11.ERROR = {
|
|||
};
|
||||
|
||||
/*
|
||||
* These are our custom controller functions for all IOPAGE accesses.
|
||||
* Every entry in the aIOHandlers table is an array with the following indexes:
|
||||
*/
|
||||
BusPDP11.IOHANDLER = {
|
||||
READ_BYTE: 0,
|
||||
WRITE_BYTE: 1,
|
||||
READ_WORD: 2,
|
||||
WRITE_WORD: 3,
|
||||
NAME: 4
|
||||
};
|
||||
|
||||
/*
|
||||
* These are our custom IOController functions for all IOPAGE accesses. They look up the IOPAGE
|
||||
* offset in the aIOHandlers table, and if an entry exists, they use the appropriate IOHANDLER indexes
|
||||
* (above) to locate the registered read/write handlers. If no handler is found, then unknownAccess()
|
||||
* is called, triggering a trap -- unless traps are disabled because direct access was requested
|
||||
* (eg, by the Debugger).
|
||||
*
|
||||
* Note that we try to have reasonable fall-backs for byte reads when only word read handlers exist,
|
||||
* and word reads if only byte handlers exist. Ditto for writes. These fall-backs may not always be
|
||||
* appropriate; for example, when a byte write falls back to a word write, the address must be read
|
||||
* first, and depending on the underlying I/O device, that may or may not have side-effects. It's really
|
||||
* up to the device to know whether that matters, and provide all the necessary handlers if it does.
|
||||
* Handlers receive the original IOPAGE address that was used, although in most cases, it's ignored,
|
||||
* because most handlers usually handle only one address. Only handlers used for a range of addresses
|
||||
* must pay attention to it.
|
||||
*
|
||||
* TODO: Another small potential improvement would be for addIOHandlers() to predefine fall-backs for all
|
||||
* missing handlers, so there's never a need to check each entry (eg, afn[0], afn[1], etc) before calling
|
||||
* it. However, since there's no avoiding checking afn itself (unless we FULLY populate the aIOHandlers
|
||||
* array), and since these I/O accesses should be pretty infrequent relative to all other memory accesses,
|
||||
* the benefit seems pretty minimal.
|
||||
* Note that these functions include fallbacks for byte reads when only word read handlers exist (by
|
||||
* masking or shifting the result) and for word reads if only byte handlers exist (by combining bytes).
|
||||
* Fallbacks for writes exist, too, but they are slightly more complicated, because a byte write using
|
||||
* a word write handler requires reading the word first, and then updating the appropriate byte within
|
||||
* that word.
|
||||
*
|
||||
* Those fallbacks may not always be appropriate; for example, byte writes to some device registers
|
||||
* must be zero-extended to update the entire word. For those cases, the fallback's "preliminary" read
|
||||
* is issued with a zero address so that the handler can distinguish a normal read from one of these
|
||||
* preliminary reads (aka read-before-write), and return an appropriate value for the update (eg, zero).
|
||||
*
|
||||
* If none of these fallback behaviors are appropriate, the device has a simple recourse: register
|
||||
* handlers for all possible addresses and sizes.
|
||||
*
|
||||
* Unlike regular Memory blocks, IOPAGE accesses permit word accesses on ODD addresses; that works
|
||||
* just fine by registering WORD handlers for the appropriate ODD addresses. For BYTE accesses, it
|
||||
* depends. For CPU register addresses, addIOHandlers() installs special byte handlers that perform
|
||||
* either a simple word read or write. Other addresses must be handled on case-by-case basis.
|
||||
*
|
||||
* TODO: Another small potential improvement would be for addIOHandlers() to install fallbacks for ALL
|
||||
* missing handlers, in both the ODD and EVEN cases, so there's never a need to check each function index
|
||||
* before calling it. However, since there's no avoiding checking aIOHandlers[off] (unless we FULLY populate
|
||||
* the aIOHandlers array), and since these I/O accesses should be pretty infrequent relative to all other
|
||||
* memory accesses, the benefit seems pretty minimal. Plus, all our fallback assumptions still need to be
|
||||
* verified, so let's wait until that's done before we start optimizing this code.
|
||||
*/
|
||||
BusPDP11.IOController = {
|
||||
|
||||
|
|
@ -191,32 +258,32 @@ BusPDP11.IOController = {
|
|||
var bus = this.controller;
|
||||
var afn = bus.aIOHandlers[off];
|
||||
if (afn) {
|
||||
if (afn[0]) {
|
||||
b = afn[0](addr);
|
||||
} else if (afn[2]) {
|
||||
if (afn[BusPDP11.IOHANDLER.READ_BYTE]) {
|
||||
b = afn[BusPDP11.IOHANDLER.READ_BYTE](addr);
|
||||
} else if (afn[BusPDP11.IOHANDLER.READ_WORD]) {
|
||||
if (!(addr & 0x1)) {
|
||||
b = afn[2](addr) & 0xff;
|
||||
b = afn[BusPDP11.IOHANDLER.READ_WORD](addr) & 0xff;
|
||||
} else {
|
||||
b = afn[2](addr & ~0x1) >> 8;
|
||||
b = afn[BusPDP11.IOHANDLER.READ_WORD](addr & ~0x1) >> 8;
|
||||
}
|
||||
}
|
||||
} else if (addr & 0x1) {
|
||||
afn = bus.aIOHandlers[off & ~0x1];
|
||||
if (afn) {
|
||||
if (afn[2]) {
|
||||
b = afn[2](addr & ~0x1) >> 8;
|
||||
if (afn[BusPDP11.IOHANDLER.READ_WORD]) {
|
||||
b = afn[BusPDP11.IOHANDLER.READ_WORD](addr & ~0x1) >> 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (b >= 0) {
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) {
|
||||
this.dbg.printMessage(afn[5] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, true);
|
||||
this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readByte(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(b), true, true);
|
||||
}
|
||||
return b;
|
||||
}
|
||||
b = bus.fnAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 1);
|
||||
b = bus.unknownAccess(addr, true);
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) {
|
||||
this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b));
|
||||
this.dbg.printMessage("warning: unconverted read access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true);
|
||||
}
|
||||
return b;
|
||||
},
|
||||
|
|
@ -237,23 +304,27 @@ BusPDP11.IOController = {
|
|||
var afn = bus.aIOHandlers[off];
|
||||
if (afn) {
|
||||
/*
|
||||
* If a writeByte() handler exists, call it; we're done
|
||||
* If a writeByte() handler exists, call it; we're done.
|
||||
*/
|
||||
if (afn[1]) {
|
||||
afn[1](b, addr);
|
||||
if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) {
|
||||
afn[BusPDP11.IOHANDLER.WRITE_BYTE](b, addr);
|
||||
fWrite = true;
|
||||
}
|
||||
/*
|
||||
* If a writeWord() handler exists, call the readWord() handler first to get the original data,
|
||||
* then call writeWord() with the new data pre-inserted into the original data.
|
||||
* then call writeWord() with the new data pre-inserted in the original data.
|
||||
*
|
||||
* WARNING: Whenever we call readWord() under these circumstances, we zero the address parameter,
|
||||
* so that the handler can distinguish this case. Thus, if we're dealing with a special register
|
||||
* where a byte write operation modifies the entire register, the handler can simply return zero.
|
||||
*/
|
||||
else if (afn[3]) {
|
||||
w = afn[2]? afn[2](addr) : 0;
|
||||
else if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) {
|
||||
w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](0) : 0;
|
||||
if (!(addr & 0x1)) {
|
||||
afn[3]((w & ~0xff) | b, addr);
|
||||
afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & ~0xff) | b, addr);
|
||||
fWrite = true;
|
||||
} else {
|
||||
afn[3]((w & 0xff) | (b << 8), addr & ~0x1);
|
||||
afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addr & ~0x1);
|
||||
fWrite = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -261,27 +332,31 @@ BusPDP11.IOController = {
|
|||
/*
|
||||
* If no handler existed, and this address was odd, then perhaps a handler exists for the even address;
|
||||
* if so, call the readWord() handler first to get the original data, then call writeWord() with the new
|
||||
* data pre-inserted into (the high byte of) the original data.
|
||||
* data pre-inserted in (the high byte of) the original data.
|
||||
*
|
||||
* WARNING: Whenever we call readWord() under these circumstances, we zero the address parameter,
|
||||
* so that the handler can distinguish this case. Thus, if we're dealing with a special register
|
||||
* where a byte write operation modifies the entire register, the handler can simply return zero.
|
||||
*/
|
||||
afn = bus.aIOHandlers[off & ~0x1];
|
||||
if (afn) {
|
||||
if (afn[3]) {
|
||||
if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) {
|
||||
addr &= ~0x1;
|
||||
w = afn[2]? afn[2](addr) : 0;
|
||||
afn[3]((w & 0xff) | (b << 8), addr);
|
||||
w = afn[BusPDP11.IOHANDLER.READ_WORD]? afn[BusPDP11.IOHANDLER.READ_WORD](0) : 0;
|
||||
afn[BusPDP11.IOHANDLER.WRITE_WORD]((w & 0xff) | (b << 8), addr);
|
||||
fWrite = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fWrite) {
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) {
|
||||
this.dbg.printMessage(afn[5] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, true);
|
||||
this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeByte(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(b) + ")", true, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
bus.fnAccess(addr | BusPDP11.IOPAGE_22BIT, b, 1);
|
||||
bus.unknownAccess(addr, true, b);
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) {
|
||||
this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b));
|
||||
this.dbg.printMessage("warning: unconverted write access to byte @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(b), true, true);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -297,24 +372,23 @@ BusPDP11.IOController = {
|
|||
{
|
||||
var w = -1;
|
||||
var bus = this.controller;
|
||||
Component.assert(!(addr & 1)); // unaligned addresses should be getting trapped at a higher level
|
||||
var afn = bus.aIOHandlers[off];
|
||||
if (afn) {
|
||||
if (afn[2]) {
|
||||
w = afn[2](addr);
|
||||
} else if (afn[0]) {
|
||||
w = afn[0](addr) | (afn[0](addr + 1) << 8);
|
||||
if (afn[BusPDP11.IOHANDLER.READ_WORD]) {
|
||||
w = afn[BusPDP11.IOHANDLER.READ_WORD](addr);
|
||||
} else if (afn[BusPDP11.IOHANDLER.READ_BYTE]) {
|
||||
w = afn[BusPDP11.IOHANDLER.READ_BYTE](addr) | (afn[BusPDP11.IOHANDLER.READ_BYTE](addr + 1) << 8);
|
||||
}
|
||||
}
|
||||
if (w >= 0) {
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) {
|
||||
this.dbg.printMessage(afn[5] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, true);
|
||||
this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".readWord(" + this.dbg.toStrBase(addr) + "): " + this.dbg.toStrBase(w), true, true);
|
||||
}
|
||||
return w;
|
||||
}
|
||||
w = bus.fnAccess(addr | BusPDP11.IOPAGE_22BIT, -1, 0);
|
||||
w = bus.unknownAccess(addr, false);
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) {
|
||||
this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w));
|
||||
this.dbg.printMessage("warning: unconverted read access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true);
|
||||
}
|
||||
return w;
|
||||
},
|
||||
|
|
@ -331,27 +405,26 @@ BusPDP11.IOController = {
|
|||
{
|
||||
var fWrite = false;
|
||||
var bus = this.controller;
|
||||
Component.assert(!(addr & 1)); // unaligned addresses should be getting trapped at a higher level
|
||||
var afn = bus.aIOHandlers[off];
|
||||
if (afn) {
|
||||
if (afn[3]) {
|
||||
afn[3](w, addr);
|
||||
if (afn[BusPDP11.IOHANDLER.WRITE_WORD]) {
|
||||
afn[BusPDP11.IOHANDLER.WRITE_WORD](w, addr);
|
||||
fWrite = true;
|
||||
} else if (afn[1]) {
|
||||
afn[1](w & 0xff, addr);
|
||||
afn[1](w >> 8, addr + 1);
|
||||
} else if (afn[BusPDP11.IOHANDLER.WRITE_BYTE]) {
|
||||
afn[BusPDP11.IOHANDLER.WRITE_BYTE](w & 0xff, addr);
|
||||
afn[BusPDP11.IOHANDLER.WRITE_BYTE](w >> 8, addr + 1);
|
||||
fWrite = true;
|
||||
}
|
||||
}
|
||||
if (fWrite) {
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) {
|
||||
this.dbg.printMessage(afn[5] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, true);
|
||||
this.dbg.printMessage(afn[BusPDP11.IOHANDLER.NAME] + ".writeWord(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(w) + ")", true, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
bus.fnAccess(addr | BusPDP11.IOPAGE_22BIT, w, 0);
|
||||
bus.unknownAccess(addr, false, w);
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) {
|
||||
this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w));
|
||||
this.dbg.printMessage("warning: unconverted write access to word @" + this.dbg.toStrBase(addr) + ": " + this.dbg.toStrBase(w), true, true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -365,30 +438,54 @@ BusPDP11.IOController = {
|
|||
*/
|
||||
BusPDP11.prototype.initMemory = function()
|
||||
{
|
||||
var block = new MemoryPDP11();
|
||||
var block = new MemoryPDP11(this);
|
||||
block.copyBreakpoints(this.dbg);
|
||||
this.aMemBlocks = new Array(this.nBlockTotal);
|
||||
for (var iBlock = 0; iBlock < this.nBlockTotal; iBlock++) {
|
||||
this.aMemBlocks[iBlock] = block;
|
||||
}
|
||||
this.afnIOPage = new Array(4);
|
||||
this.afnIOPage[0] = BusPDP11.IOController.readByte;
|
||||
this.afnIOPage[1] = BusPDP11.IOController.writeByte;
|
||||
this.afnIOPage[2] = BusPDP11.IOController.readWord;
|
||||
this.afnIOPage[3] = BusPDP11.IOController.writeWord;
|
||||
/*
|
||||
* Map IOPAGE at the top of the address space (as determined by nBusWidth), as well as at IOPAGE_VIRT
|
||||
* (which is the only place that 16-bit code can reach the IOPAGE when memory management is not enabled).
|
||||
*/
|
||||
var addr = this.addrTotal - BusPDP11.IOPAGE_LENGTH;
|
||||
this.addMemory(addr, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this);
|
||||
this.addMemory(BusPDP11.IOPAGE_VIRT, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this);
|
||||
};
|
||||
|
||||
/**
|
||||
* setIOPageRange(nRange)
|
||||
*
|
||||
* We can define the IOPAGE address range with a single number, because the size of the IOPAGE is fixed at 8Kb.
|
||||
* The bottom of the range is (2 ^ nRange) - IOPAGE_LENGTH, and the top is (2 ^ nRange) - 1.
|
||||
*
|
||||
* Note that we defer our initial call to this function as long as possible (ie, at the end of reset()) so that
|
||||
* other components have first shot at adding their own memory blocks (if any), because addMemory() only allows
|
||||
* installing memory on top of empty memory blocks.
|
||||
*
|
||||
* @this {BusPDP11}
|
||||
* @param {number} nRange (16, 18 or 22; 0 removes the IOPAGE altogether)
|
||||
*/
|
||||
BusPDP11.prototype.setIOPageRange = function(nRange)
|
||||
{
|
||||
if (nRange != this.nIOPageRange) {
|
||||
var addr;
|
||||
if (this.nIOPageRange) {
|
||||
addr = (1 << this.nIOPageRange) - BusPDP11.IOPAGE_LENGTH;
|
||||
this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.prevIOPageBlocks);
|
||||
this.nIOPageRange = 0;
|
||||
}
|
||||
if (nRange) {
|
||||
this.nIOPageRange = nRange;
|
||||
addr = (1 << nRange) - BusPDP11.IOPAGE_LENGTH;
|
||||
this.prevIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH);
|
||||
if (this.realIOPageBlocks) {
|
||||
this.setMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH, this.realIOPageBlocks);
|
||||
} else {
|
||||
this.addMemory(addr, BusPDP11.IOPAGE_LENGTH, MemoryPDP11.TYPE.CONTROLLER, this);
|
||||
this.realIOPageBlocks = this.getMemoryBlocks(addr, BusPDP11.IOPAGE_LENGTH);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* getControllerBuffer(addr)
|
||||
*
|
||||
* Our Bus component also acts as custom memory controller, so it must also provide this function.
|
||||
* Our Bus component also acts as custom memory controller for the IOPAGE, so it must also provide this function.
|
||||
*
|
||||
* @this {BusPDP11}
|
||||
* @param {number} addr
|
||||
|
|
@ -396,13 +493,16 @@ BusPDP11.prototype.initMemory = function()
|
|||
*/
|
||||
BusPDP11.prototype.getControllerBuffer = function(addr)
|
||||
{
|
||||
/*
|
||||
* No buffer is required for the IOPAGE; all accesses go to registered I/O handlers or to unknownAccess().
|
||||
*/
|
||||
return [null, 0];
|
||||
};
|
||||
|
||||
/**
|
||||
* getControllerAccess()
|
||||
*
|
||||
* Our Bus component also acts as custom memory controller, so it must also provide this function.
|
||||
* Our Bus component also acts as custom memory controller for the IOPAGE, so it must also provide this function.
|
||||
*
|
||||
* @this {BusPDP11}
|
||||
* @return {Array.<function()>}
|
||||
|
|
@ -412,36 +512,54 @@ BusPDP11.prototype.getControllerAccess = function()
|
|||
return this.afnIOPage;
|
||||
};
|
||||
|
||||
/**
|
||||
* getWidth()
|
||||
*
|
||||
* @this {BusPDP11}
|
||||
* @return {number}
|
||||
*/
|
||||
BusPDP11.prototype.getWidth = function()
|
||||
{
|
||||
return this.nBusWidth;
|
||||
};
|
||||
|
||||
/**
|
||||
* reset()
|
||||
*
|
||||
* The Device component initializes fnReset by calling addIODefaultHandlers() from its initBus() function;
|
||||
* it will be that function's responsibility to reset all the necessary devices.
|
||||
* Call all registered reset() handlers.
|
||||
*
|
||||
* @this {BusPDP11}
|
||||
*/
|
||||
BusPDP11.prototype.reset = function()
|
||||
{
|
||||
if (this.fnReset) this.fnReset();
|
||||
for (var i = 0; i < this.afnReset.length; i++) {
|
||||
this.afnReset[i]();
|
||||
}
|
||||
this.setIOPageRange(16);
|
||||
};
|
||||
|
||||
/**
|
||||
* access(addr, data, byteFlag)
|
||||
* unknownAccess(addr, fByte, data)
|
||||
*
|
||||
* This is our default I/O handler, called whenever there's an IOPAGE access without a corresponding entry
|
||||
* in aIOHandlers; in the interim, our Device component will override this default handler with its own function
|
||||
* by calling addIODefaultHandlers(), until the Device component has been completely rewritten to install I/O
|
||||
* handlers for all supported I/O addresses.
|
||||
* This is our default I/O handler, called when there's an IOPAGE access without a corresponding entry in aIOHandlers.
|
||||
*
|
||||
* @this {BusPDP11}
|
||||
* @param {number} addr (ie, an IOPAGE address)
|
||||
* @param {number} data (-1 if read, otherwise write)
|
||||
* @param {number} byteFlag (true if byte I/O, otherwise word)
|
||||
* @param {boolean} [fByte] (true if byte access, otherwise word)
|
||||
* @param {number} [data] (undefined if read, otherwise write)
|
||||
* @return {number}
|
||||
*/
|
||||
BusPDP11.prototype.access = function(addr, data, byteFlag)
|
||||
BusPDP11.prototype.unknownAccess = function(addr, fByte, data)
|
||||
{
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.BUS)) {
|
||||
this.dbg.printMessage("warning: unrecognized access(" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data) + "," + byteFlag + ")");
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) {
|
||||
/*
|
||||
* TODO: For 22-bit machines, let's display addr as a 3-byte value (for a total of 9 octal digits)
|
||||
*/
|
||||
this.dbg.printMessage("warning: unknown I/O access (" + this.dbg.toStrBase(addr) + "," + this.dbg.toStrBase(data, fByte?1:2) + ")", true, true);
|
||||
if (this.dbg.stopInstruction()) return 0;
|
||||
}
|
||||
if (!this.nDisableTraps) {
|
||||
this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr);
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
|
@ -512,8 +630,13 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller)
|
|||
var sizeBlock = this.nBlockSize - (addrNext - addrBlock);
|
||||
if (sizeBlock > sizeLeft) sizeBlock = sizeLeft;
|
||||
|
||||
if (block && block.size) {
|
||||
if (block.type == type && block.controller == controller) {
|
||||
/*
|
||||
* addMemory() will now happily replace an existing block when a memory controller is specified;
|
||||
* this is a work-around to make life easier for setIOPageRange(), which otherwise would have to call
|
||||
* removeMemory() first, which would just waste time and memory allocating more (empty) blocks.
|
||||
*/
|
||||
if (!controller && block && block.size) {
|
||||
if (block.type == type /* && block.controller == controller */) {
|
||||
/*
|
||||
* Where there is already a similar block with a non-zero size, we allow the allocation only if:
|
||||
*
|
||||
|
|
@ -538,7 +661,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller)
|
|||
return this.reportError(BusPDP11.ERROR.RANGE_INUSE, addrNext, sizeLeft);
|
||||
}
|
||||
|
||||
var blockNew = new MemoryPDP11(addrNext, sizeBlock, this.nBlockSize, type, controller);
|
||||
var blockNew = new MemoryPDP11(this, addrNext, sizeBlock, this.nBlockSize, type, controller);
|
||||
blockNew.copyBreakpoints(this.dbg, block);
|
||||
this.aMemBlocks[iBlock++] = blockNew;
|
||||
|
||||
|
|
@ -547,7 +670,7 @@ BusPDP11.prototype.addMemory = function(addr, size, type, controller)
|
|||
}
|
||||
|
||||
if (sizeLeft <= 0) {
|
||||
this.status(Math.floor(size / 1024) + "Kb " + MemoryPDP11.TYPE.NAMES[type] + " at " + str.toHexLong(addr));
|
||||
this.status(str.toDec(size / 1024) + "Kb " + MemoryPDP11.TYPE_NAMES[type] + " at " + str.toOct(addr));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -647,17 +770,6 @@ BusPDP11.prototype.scanMemory = function(info, addr, size)
|
|||
return info;
|
||||
};
|
||||
|
||||
/**
|
||||
* getWidth()
|
||||
*
|
||||
* @this {BusPDP11}
|
||||
* @return {number}
|
||||
*/
|
||||
BusPDP11.prototype.getWidth = function()
|
||||
{
|
||||
return this.nBusWidth;
|
||||
};
|
||||
|
||||
/**
|
||||
* removeMemory(addr, size)
|
||||
*
|
||||
|
|
@ -676,7 +788,7 @@ BusPDP11.prototype.removeMemory = function(addr, size)
|
|||
var iBlock = addr >>> this.nBlockShift;
|
||||
while (size > 0) {
|
||||
var blockOld = this.aMemBlocks[iBlock];
|
||||
var blockNew = new MemoryPDP11(addr);
|
||||
var blockNew = new MemoryPDP11(this, addr);
|
||||
blockNew.copyBreakpoints(this.dbg, blockOld);
|
||||
this.aMemBlocks[iBlock++] = blockNew;
|
||||
addr = iBlock * this.nBlockSize;
|
||||
|
|
@ -762,7 +874,7 @@ BusPDP11.prototype.setMemoryBlocks = function(addr, size, aBlocks, type)
|
|||
this.assert(block);
|
||||
if (!block) break;
|
||||
if (type !== undefined) {
|
||||
var blockNew = new MemoryPDP11(addr);
|
||||
var blockNew = new MemoryPDP11(this, addr);
|
||||
blockNew.clone(block, type, this.dbg);
|
||||
block = blockNew;
|
||||
}
|
||||
|
|
@ -794,7 +906,10 @@ BusPDP11.prototype.getByte = function(addr)
|
|||
*/
|
||||
BusPDP11.prototype.getByteDirect = function(addr)
|
||||
{
|
||||
return this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr);
|
||||
this.nDisableTraps++;
|
||||
var b = this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].readByteDirect(addr & this.nBlockLimit, addr);
|
||||
this.nDisableTraps--;
|
||||
return b;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -808,10 +923,10 @@ BusPDP11.prototype.getWord = function(addr)
|
|||
{
|
||||
var off = addr & this.nBlockLimit;
|
||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
||||
if (off != this.nBlockLimit) {
|
||||
return this.aMemBlocks[iBlock].readWord(off, addr);
|
||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||
return this.aMemBlocks[iBlock++].readByte(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByte(0, addr + 1) << 8);
|
||||
}
|
||||
return this.aMemBlocks[iBlock++].readByte(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByte(0, addr + 1) << 8);
|
||||
return this.aMemBlocks[iBlock].readWord(off, addr);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -825,12 +940,17 @@ BusPDP11.prototype.getWord = function(addr)
|
|||
*/
|
||||
BusPDP11.prototype.getWordDirect = function(addr)
|
||||
{
|
||||
var w;
|
||||
var off = addr & this.nBlockLimit;
|
||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
||||
if (off != this.nBlockLimit) {
|
||||
return this.aMemBlocks[iBlock].readWordDirect(off, addr);
|
||||
this.nDisableTraps++;
|
||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||
w = this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8);
|
||||
} else {
|
||||
w = this.aMemBlocks[iBlock].readWordDirect(off, addr);
|
||||
}
|
||||
return this.aMemBlocks[iBlock++].readByteDirect(off, addr) | (this.aMemBlocks[iBlock & this.nBlockMask].readByteDirect(0, addr + 1) << 8);
|
||||
this.nDisableTraps--;
|
||||
return w;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -857,7 +977,9 @@ BusPDP11.prototype.setByte = function(addr, b)
|
|||
*/
|
||||
BusPDP11.prototype.setByteDirect = function(addr, b)
|
||||
{
|
||||
this.nDisableTraps++;
|
||||
this.aMemBlocks[(addr & this.nBusMask) >>> this.nBlockShift].writeByteDirect(addr & this.nBlockLimit, b & 0xff, addr);
|
||||
this.nDisableTraps--;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -871,12 +993,12 @@ BusPDP11.prototype.setWord = function(addr, w)
|
|||
{
|
||||
var off = addr & this.nBlockLimit;
|
||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
||||
if (off != this.nBlockLimit) {
|
||||
this.aMemBlocks[iBlock].writeWord(off, w & 0xffff, addr);
|
||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||
this.aMemBlocks[iBlock++].writeByte(off, w & 0xff, addr);
|
||||
this.aMemBlocks[iBlock & this.nBlockMask].writeByte(0, (w >> 8) & 0xff, addr + 1);
|
||||
return;
|
||||
}
|
||||
this.aMemBlocks[iBlock++].writeByte(off, w & 0xff, addr);
|
||||
this.aMemBlocks[iBlock & this.nBlockMask].writeByte(0, (w >> 8) & 0xff, addr + 1);
|
||||
this.aMemBlocks[iBlock].writeWord(off, w & 0xffff, addr);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -893,12 +1015,14 @@ BusPDP11.prototype.setWordDirect = function(addr, w)
|
|||
{
|
||||
var off = addr & this.nBlockLimit;
|
||||
var iBlock = (addr & this.nBusMask) >>> this.nBlockShift;
|
||||
if (off != this.nBlockLimit) {
|
||||
this.nDisableTraps++;
|
||||
if (!PDP11.WORDBUS && off == this.nBlockLimit) {
|
||||
this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr);
|
||||
this.aMemBlocks[iBlock & this.nBlockMask].writeByteDirect(0, (w >> 8) & 0xff, addr + 1);
|
||||
} else {
|
||||
this.aMemBlocks[iBlock].writeWordDirect(off, w & 0xffff, addr);
|
||||
return;
|
||||
}
|
||||
this.aMemBlocks[iBlock++].writeByteDirect(off, w & 0xff, addr);
|
||||
this.aMemBlocks[iBlock & this.nBlockMask].writeByteDirect(0, (w >> 8) & 0xff, addr + 1);
|
||||
this.nDisableTraps--;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1045,7 +1169,7 @@ BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte,
|
|||
Component.warning("I/O address already registered: " + str.toHexLong(addr));
|
||||
continue;
|
||||
}
|
||||
this.aIOHandlers[off] = [fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, false, sName || "unknown"];
|
||||
this.aIOHandlers[off] = [fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, sName || "unknown", false];
|
||||
if (MAXDEBUG) this.log("addIOHandlers(" + str.toHexLong(addr) + ")");
|
||||
}
|
||||
};
|
||||
|
|
@ -1062,28 +1186,71 @@ BusPDP11.prototype.addIOHandlers = function(start, end, fnReadByte, fnWriteByte,
|
|||
BusPDP11.prototype.addIOTable = function(component, table)
|
||||
{
|
||||
for (var port in table) {
|
||||
var addr = +port;
|
||||
var afn = table[port];
|
||||
|
||||
/*
|
||||
* Don't install (ie, ignore) handlers for I/O addresses that are defined with a model number
|
||||
* that is "greater than" than the current model.
|
||||
*/
|
||||
if (afn[5] && afn[5] > this.cpu.model) continue;
|
||||
|
||||
var fnReadByte = afn[0]? afn[0].bind(component) : null;
|
||||
var fnWriteByte = afn[1]? afn[1].bind(component) : null;
|
||||
var fnReadWord = afn[2]? afn[2].bind(component) : null;
|
||||
var fnWriteWord = afn[3]? afn[3].bind(component) : null;
|
||||
this.addIOHandlers(+port, +port, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, afn[4]);
|
||||
|
||||
/*
|
||||
* As discussed in the IOController comments above, when handlers are being registered for the following
|
||||
* addresses, we must install different fallback handlers for all BYTE accesses.
|
||||
*/
|
||||
if (addr >= PDP11.UNIBUS.R0SET0 && addr <= PDP11.UNIBUS.R6USER) {
|
||||
if (!fnReadByte && fnReadWord) {
|
||||
fnReadByte = function readByteIORegister(readWord) {
|
||||
return function(addr) {
|
||||
return readWord(addr) & 0xff;
|
||||
}.bind(component);
|
||||
}(fnReadWord);
|
||||
}
|
||||
if (!fnWriteByte && fnWriteWord) {
|
||||
fnWriteByte = function writeByteIORegister(writeWord) {
|
||||
return function(data, addr) {
|
||||
return writeWord(data, addr);
|
||||
}.bind(component);
|
||||
}(fnWriteWord);
|
||||
}
|
||||
}
|
||||
this.addIOHandlers(addr, addr, fnReadByte, fnWriteByte, fnReadWord, fnWriteWord, afn[4]);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* addIODefaultHandlers(fnReset, fnAccess)
|
||||
*
|
||||
* Add default I/O notification handlers.
|
||||
* addResetHandler(fnReset)
|
||||
*
|
||||
* @this {BusPDP11}
|
||||
* @param {function()} fnReset
|
||||
* @param {function(number,number,number)} fnAccess
|
||||
*/
|
||||
BusPDP11.prototype.addIODefaultHandlers = function(fnReset, fnAccess)
|
||||
BusPDP11.prototype.addResetHandler = function(fnReset)
|
||||
{
|
||||
this.fnReset = fnReset;
|
||||
this.fnAccess = fnAccess;
|
||||
this.afnReset.push(fnReset);
|
||||
};
|
||||
|
||||
/**
|
||||
* fault(addr)
|
||||
*
|
||||
* Memory interface for signaling alignment errors.
|
||||
*
|
||||
* @this {BusPDP11}
|
||||
* @param {number} addr
|
||||
*/
|
||||
BusPDP11.prototype.fault = function(addr)
|
||||
{
|
||||
if (!this.nDisableTraps) {
|
||||
if (DEBUGGER && this.dbg && this.dbg.messageEnabled(MessagesPDP11.WARN)) {
|
||||
this.dbg.printMessage("memory fault on address " + this.dbg.toStrBase(addr), true, true);
|
||||
}
|
||||
this.cpu.trap(PDP11.TRAP.BUS_ERROR, addr);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
/**
|
||||
* @fileoverview Implements the PDP11 Computer component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Sep-03
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
||||
* may be used freely provided the original author name is acknowledged in any modified source code.
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of September 2016 at <http://skn.noip.me/pdp11/pdp11.html>. This code
|
||||
* may be used freely provided the original authors are acknowledged in any modified source code.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -21,9 +20,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -185,7 +184,7 @@ function ComputerPDP11(parmsComputer, parmsMachine, fSuspended) {
|
|||
|
||||
this.println(PDP11.APPNAME + " v" + PDP11.APPVERSION + "\n" + COPYRIGHT + "\n" + LICENSE);
|
||||
|
||||
this.println("Portions adapted from the PDP-11/70 Emulator v1.3 by Paul Nankervis <paulnank@hotmail.com>");
|
||||
this.println("Portions adapted from the PDP-11/70 Emulator v1.4 by Paul Nankervis <paulnank@hotmail.com>");
|
||||
|
||||
if (DEBUG && this.messageEnabled()) this.printMessage("TYPEDARRAYS: " + TYPEDARRAYS);
|
||||
|
||||
|
|
@ -1000,6 +999,7 @@ ComputerPDP11.prototype.start = function(ms, nCycles)
|
|||
component.start(ms, nCycles);
|
||||
}
|
||||
}
|
||||
this.updateStatus(true);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1024,19 +1024,20 @@ ComputerPDP11.prototype.stop = function(ms, nCycles)
|
|||
component.stop(ms, nCycles);
|
||||
}
|
||||
}
|
||||
this.updateStatus(true);
|
||||
};
|
||||
|
||||
/**
|
||||
* setBinding(sHTMLType, sBinding, control, sValue)
|
||||
* setBinding(sType, sBinding, control, sValue)
|
||||
*
|
||||
* @this {ComputerPDP11}
|
||||
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas")
|
||||
* @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc)
|
||||
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "reset")
|
||||
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
|
||||
* @param {string} [sValue] optional data value
|
||||
* @return {boolean} true if binding was successful, false if unrecognized binding request
|
||||
*/
|
||||
ComputerPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
|
||||
ComputerPDP11.prototype.setBinding = function(sType, sBinding, control, sValue)
|
||||
{
|
||||
var computer = this;
|
||||
|
||||
|
|
@ -1448,7 +1449,7 @@ ComputerPDP11.prototype.updateStatus = function(fForce)
|
|||
/**
|
||||
* ComputerPDP11.init()
|
||||
*
|
||||
* For every machine represented by an HTML element of class "pcjs-machine", this function
|
||||
* For every machine represented by an HTML element of class "pdp11-machine", this function
|
||||
* locates the HTML element of class "computer", extracting the JSON-encoded parameters for the
|
||||
* Computer constructor from the element's "data-value" attribute, invoking the constructor to
|
||||
* create a Computer component, and then binding any associated HTML controls to the new component.
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
/**
|
||||
* @fileoverview Controls the PDP11 CPU component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Sep-03
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
||||
* may be used freely provided the original author name is acknowledged in any modified source code.
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of September 2016 at <http://skn.noip.me/pdp11/pdp11.html>. This code
|
||||
* may be used freely provided the original authors are acknowledged in any modified source code.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -21,9 +20,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -127,11 +126,6 @@ function CPUPDP11(parmsCPU, nCyclesDefault)
|
|||
this.flags.starting = false;
|
||||
this.flags.autoStart = parmsCPU['autoStart'];
|
||||
|
||||
/*
|
||||
* TODO: Add some UI for fDisplayLiveRegs (either an XML property, or a UI checkbox, or both)
|
||||
*/
|
||||
this.flags.displayLiveRegs = false;
|
||||
|
||||
/*
|
||||
* Get checksum parameters, if any. runCPU() behavior is not affected until fChecksum
|
||||
* is true, which won't happen until resetChecksum() is called with nCyclesChecksumInterval
|
||||
|
|
@ -198,11 +192,6 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
if (control) this.cmp.setBinding(null, CPUPDP11.BUTTONS[i], control);
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach the ChipSet component to the CPU so that it can be notified whenever the CPU stops and starts.
|
||||
*/
|
||||
this.chipset = null; // /** @type {ChipSetPDP11} */ (cmp.getMachineComponent("ChipSet"));
|
||||
|
||||
/*
|
||||
* We've already saved the parmsCPU 'autoStart' setting, but there may be a machine (or URL) override.
|
||||
*/
|
||||
|
|
@ -217,6 +206,8 @@ CPUPDP11.prototype.initBus = function(cmp, bus, cpu, dbg)
|
|||
/**
|
||||
* reset()
|
||||
*
|
||||
* Stub for reset notification (overridden by the CPUStatePDP11 component).
|
||||
*
|
||||
* @this {CPUPDP11}
|
||||
*/
|
||||
CPUPDP11.prototype.reset = function()
|
||||
|
|
@ -226,7 +217,7 @@ CPUPDP11.prototype.reset = function()
|
|||
/**
|
||||
* save()
|
||||
*
|
||||
* This is a placeholder for save support (overridden by the CPUStatePDP11 component).
|
||||
* Stub for save support (overridden by the CPUStatePDP11 component).
|
||||
*
|
||||
* @this {CPUPDP11}
|
||||
* @return {Object|null}
|
||||
|
|
@ -239,7 +230,7 @@ CPUPDP11.prototype.save = function()
|
|||
/**
|
||||
* restore(data)
|
||||
*
|
||||
* This is a placeholder for restore support (overridden by the CPUStatePDP11 component).
|
||||
* Stub for restore support (overridden by the CPUStatePDP11 component).
|
||||
*
|
||||
* @this {CPUPDP11}
|
||||
* @param {Object} data
|
||||
|
|
@ -292,7 +283,7 @@ CPUPDP11.prototype.powerUp = function(data, fRepower)
|
|||
*
|
||||
* this.flags.powered = true;
|
||||
*/
|
||||
this.updateCPU();
|
||||
this.cmp.updateStatus();
|
||||
return true;
|
||||
};
|
||||
|
||||
|
|
@ -455,54 +446,18 @@ CPUPDP11.prototype.displayChecksum = function()
|
|||
};
|
||||
|
||||
/**
|
||||
* displayValue(sLabel, nValue, cch)
|
||||
*
|
||||
* This is principally for displaying register values, but in reality, it can be used to display any
|
||||
* numeric value bound to the given label.
|
||||
* setBinding(sType, sBinding, control, sValue)
|
||||
*
|
||||
* @this {CPUPDP11}
|
||||
* @param {string} sLabel
|
||||
* @param {number} nValue
|
||||
* @param {number} [cch]
|
||||
*/
|
||||
CPUPDP11.prototype.displayValue = function(sLabel, nValue, cch)
|
||||
{
|
||||
if (this.bindings[sLabel]) {
|
||||
if (nValue === undefined) {
|
||||
this.setError("Value for " + sLabel + " is invalid");
|
||||
this.stopCPU();
|
||||
}
|
||||
var sVal;
|
||||
var nBase = this.dbg && this.dbg.nBase || 8;
|
||||
if (!this.flags.running || this.flags.displayLiveRegs) {
|
||||
sVal = nBase == 8? str.toOct(nValue, cch) : str.toHex(nValue, cch);
|
||||
} else {
|
||||
sVal = "--------".substr(0, cch || 4);
|
||||
}
|
||||
/*
|
||||
* TODO: Determine if this test actually avoids any redrawing when a register hasn't changed, and/or if
|
||||
* we should maintain our own (numeric) cache of displayed register values (to avoid creating these temporary
|
||||
* string values that will have to garbage-collected), and/or if this is actually slower, and/or if I'm being
|
||||
* too obsessive.
|
||||
*/
|
||||
if (this.bindings[sLabel].textContent != sVal) this.bindings[sLabel].textContent = sVal;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* setBinding(sHTMLType, sBinding, control, sValue)
|
||||
*
|
||||
* @this {CPUPDP11}
|
||||
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas")
|
||||
* @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc)
|
||||
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "run")
|
||||
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
|
||||
* @param {string} [sValue] optional data value
|
||||
* @return {boolean} true if binding was successful, false if unrecognized binding request
|
||||
*/
|
||||
CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
|
||||
CPUPDP11.prototype.setBinding = function(sType, sBinding, control, sValue)
|
||||
{
|
||||
var cpu = this;
|
||||
var fBound = false;
|
||||
|
||||
switch (sBinding) {
|
||||
case "power":
|
||||
|
|
@ -513,8 +468,7 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
|
|||
* so we record those bindings here and pass them on to the Computer component in initBus().
|
||||
*/
|
||||
this.bindings[sBinding] = control;
|
||||
fBound = true;
|
||||
break;
|
||||
return true;
|
||||
|
||||
case "run":
|
||||
this.bindings[sBinding] = control;
|
||||
|
|
@ -530,13 +484,11 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
|
|||
else
|
||||
cpu.stopCPU();
|
||||
};
|
||||
fBound = true;
|
||||
break;
|
||||
return true;
|
||||
|
||||
case "speed":
|
||||
this.bindings[sBinding] = control;
|
||||
fBound = true;
|
||||
break;
|
||||
return true;
|
||||
|
||||
case "setSpeed":
|
||||
this.bindings[sBinding] = control;
|
||||
|
|
@ -544,47 +496,27 @@ CPUPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
|
|||
cpu.setSpeed(cpu.nCyclesMultiplier << 1, true);
|
||||
};
|
||||
control.textContent = this.getSpeedTarget();
|
||||
fBound = true;
|
||||
break;
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return fBound;
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* setBurstCycles(nCycles)
|
||||
* updateStatus(fForce)
|
||||
*
|
||||
* This function is used by the ChipSet component whenever a very low timer count is set,
|
||||
* in anticipation of the timer requiring an update sooner than the normal nCyclesPerYield
|
||||
* period in runCPU() would normally provide.
|
||||
*
|
||||
* NOTE: In this context, "timer" refers to a timer chip (eg, an Intel 8253) being emulated by
|
||||
* by the ChipSet component, not the timers managed by the CPU (eg, addTimer(), setTimer(), etc).
|
||||
* Some of the CPU bindings provide feedback and therefore need to be updated periodically. This is called
|
||||
* via the Computer's updateStatus() handler several times per second; see YIELDS_PER_STATUS.
|
||||
*
|
||||
* @this {CPUPDP11}
|
||||
* @param {number} nCycles is the target number of cycles to drop the current burst to
|
||||
* @return {boolean}
|
||||
* @param {boolean} [fForce]
|
||||
*/
|
||||
CPUPDP11.prototype.setBurstCycles = function(nCycles)
|
||||
CPUPDP11.prototype.updateStatus = function(fForce)
|
||||
{
|
||||
if (this.flags.running) {
|
||||
var nDelta = this.nStepCycles - nCycles;
|
||||
/*
|
||||
* NOTE: If nDelta is negative, we will actually be increasing nStepCycles and nBurstCycles.
|
||||
* Which is OK, but if we're also taking snapshots of the cycle counts, to make sure that instruction
|
||||
* costs are being properly assessed, then we need to update nSnapCycles as well.
|
||||
*
|
||||
* TODO: If the delta is negative, we could simply ignore the request, but we must first carefully
|
||||
* consider the impact on the ChipSet timers, if any.
|
||||
*/
|
||||
// if (DEBUG) this.nSnapCycles -= nDelta;
|
||||
this.nStepCycles -= nDelta;
|
||||
this.nBurstCycles -= nDelta;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
var controlSpeed = this.bindings["speed"];
|
||||
if (controlSpeed) controlSpeed.textContent = this.getSpeedCurrent();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -966,6 +898,11 @@ CPUPDP11.prototype.calcRemainingTime = function()
|
|||
*
|
||||
* Why not use JavaScript's setTimeout() instead? Good question. For a good answer, see setTimer() below.
|
||||
*
|
||||
* TODO: Consider making the addTimer() and setTimer() interfaces more like the addTrigger() and setTrigger()
|
||||
* interfaces (which return the underlying object instead of an array index) and maintaining a separate list
|
||||
* of active timers, in order of highest to lowest cycle countdown values, as this could speed up getBurstCycles()
|
||||
* and updateTimers() functions ever so slightly.
|
||||
*
|
||||
* @this {CPUPDP11}
|
||||
* @param {function()} callBack
|
||||
* @return {number} timer index
|
||||
|
|
@ -1004,7 +941,13 @@ CPUPDP11.prototype.setTimer = function(iTimer, ms, fReset)
|
|||
if (iTimer >= 0 && iTimer < this.aTimers.length) {
|
||||
if (fReset || this.aTimers[iTimer][0] < 0) {
|
||||
nCycles = this.getMSCycles(ms);
|
||||
this.aTimers[iTimer][0] = nCycles;
|
||||
/*
|
||||
* We must now confront the following problem: if the CPU is currently executing a burst of cycles,
|
||||
* the number of cycles it has executed in that burst so far must NOT be charged against the cycle
|
||||
* timeout we're about to set. The simplest way to resolve that is to immediately call endBurst()
|
||||
* and bias the above cycle timeout by the number of cycles that the burst executed.
|
||||
*/
|
||||
this.aTimers[iTimer][0] = nCycles + this.endBurst();
|
||||
}
|
||||
}
|
||||
return nCycles;
|
||||
|
|
@ -1019,7 +962,7 @@ CPUPDP11.prototype.setTimer = function(iTimer, ms, fReset)
|
|||
*/
|
||||
CPUPDP11.prototype.getMSCycles = function(ms)
|
||||
{
|
||||
return (this.nCyclesPerSecond * this.nCyclesMultiplier) / 1000 * ms;
|
||||
return ((this.nCyclesPerSecond * this.nCyclesMultiplier) / 1000 * ms)|0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1067,14 +1010,18 @@ CPUPDP11.prototype.updateTimers = function(nCycles)
|
|||
};
|
||||
|
||||
/**
|
||||
* endBurst()
|
||||
* endBurst(fReset)
|
||||
*
|
||||
* @this {CPUPDP11}
|
||||
* @param {boolean} [fReset]
|
||||
* @return {number} (number of cycles executed in the most recent burst)
|
||||
*/
|
||||
CPUPDP11.prototype.endBurst = function()
|
||||
CPUPDP11.prototype.endBurst = function(fReset)
|
||||
{
|
||||
this.nBurstCycles -= this.nStepCycles;
|
||||
var nCycles = this.nBurstCycles -= this.nStepCycles;
|
||||
this.nStepCycles = 0;
|
||||
if (fReset) this.nBurstCycles = 0;
|
||||
return nCycles;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1095,17 +1042,17 @@ CPUPDP11.prototype.runCPU = function()
|
|||
try {
|
||||
do {
|
||||
/*
|
||||
* nCyclesPerBurst is how many cycles we WANT to run on each iteration of stepCPU(), and may
|
||||
* be as HIGH as nCyclesPerYield, but it may be significantly less. getBurstCycles() will adjust
|
||||
* nCyclesPerBurst downward if any CPU timers need to fire during the next burst.
|
||||
* nCycles is how many cycles we WANT to run on each iteration of stepCPU(), and may be as
|
||||
* HIGH as nCyclesPerYield, but it may be significantly less. getBurstCycles() will adjust
|
||||
* nCycles downward if any CPU timers need to fire during the next burst.
|
||||
*/
|
||||
var nCyclesPerBurst = this.getBurstCycles(this.flags.checksum? 1 : this.nCyclesPerYield);
|
||||
var nCycles = this.getBurstCycles(this.flags.checksum? 1 : this.nCyclesPerYield);
|
||||
|
||||
/*
|
||||
* Execute the burst.
|
||||
*/
|
||||
try {
|
||||
this.stepCPU(nCyclesPerBurst);
|
||||
this.stepCPU(nCycles);
|
||||
}
|
||||
catch(exception) {
|
||||
/*
|
||||
|
|
@ -1117,25 +1064,22 @@ CPUPDP11.prototype.runCPU = function()
|
|||
}
|
||||
|
||||
/*
|
||||
* nCycles is how many cycles stepCPU() actually ran (nBurstCycles less any remaining nStepCycles);
|
||||
* that calculation matches the return value from stepCPU(), but since it may have thrown an exception,
|
||||
* we can't rely on it.
|
||||
* Terminate the burst, returning the number of cycles that stepCPU() actually ran.
|
||||
*/
|
||||
var nCycles = this.nBurstCycles - this.nStepCycles;
|
||||
|
||||
/*
|
||||
* Update any/all timers, firing those whose cycle countdowns have reached (or dropped below) zero.
|
||||
*/
|
||||
this.updateTimers(nCycles);
|
||||
nCycles = this.endBurst(true);
|
||||
|
||||
/*
|
||||
* Add nCycles to nCyclesThisRun, as well as nRunCycles (the cycle count since the CPU first started).
|
||||
*/
|
||||
this.nCyclesThisRun += nCycles;
|
||||
this.nRunCycles += nCycles;
|
||||
this.addCycles(0, true);
|
||||
this.updateChecksum(nCycles);
|
||||
|
||||
/*
|
||||
* Update any/all timers, firing those whose cycle countdowns have reached (or dropped below) zero.
|
||||
*/
|
||||
this.updateTimers(nCycles);
|
||||
|
||||
this.nCyclesNextYield -= nCycles;
|
||||
if (this.nCyclesNextYield <= 0) {
|
||||
this.nCyclesNextYield += this.nCyclesPerYield;
|
||||
|
|
@ -1149,7 +1093,6 @@ CPUPDP11.prototype.runCPU = function()
|
|||
}
|
||||
catch (e) {
|
||||
this.stopCPU();
|
||||
this.updateCPU();
|
||||
if (this.cmp) this.cmp.stop(usr.getTime(), this.getCycles());
|
||||
this.setError(e.stack || e.message);
|
||||
return;
|
||||
|
|
@ -1184,14 +1127,12 @@ CPUPDP11.prototype.startCPU = function(fUpdateFocus)
|
|||
this.setSpeed();
|
||||
this.flags.running = true;
|
||||
this.flags.starting = true;
|
||||
if (this.chipset) this.chipset.start();
|
||||
var controlRun = this.bindings["run"];
|
||||
if (controlRun) controlRun.textContent = "Halt";
|
||||
if (this.cmp) {
|
||||
if (fUpdateFocus) this.cmp.updateFocus(true);
|
||||
this.cmp.start(this.msStartRun, this.getCycles());
|
||||
}
|
||||
this.updateCPU(true);
|
||||
setTimeout(this.onRunTimeout, 0);
|
||||
return true;
|
||||
};
|
||||
|
|
@ -1228,35 +1169,15 @@ CPUPDP11.prototype.stopCPU = function(fComplete)
|
|||
this.addCycles(this.nRunCycles);
|
||||
this.nRunCycles = 0;
|
||||
this.flags.running = false;
|
||||
if (this.chipset) this.chipset.stop();
|
||||
var controlRun = this.bindings["run"];
|
||||
if (controlRun) controlRun.textContent = "Run";
|
||||
if (this.cmp) {
|
||||
this.cmp.stop(usr.getTime(), this.getCycles());
|
||||
}
|
||||
this.updateCPU();
|
||||
}
|
||||
this.flags.complete = fComplete;
|
||||
};
|
||||
|
||||
/**
|
||||
* updateCPU(fForce)
|
||||
*
|
||||
* This used to be performed at the end of every stepCPU(), but runCPU() -- which relies upon
|
||||
* stepCPU() -- needed to have more control over when these updates are performed. However, for
|
||||
* other callers of stepCPU(), such as the Debugger, the combination of stepCPU() + updateCPU()
|
||||
* provides the old behavior.
|
||||
*
|
||||
* @this {CPUPDP11}
|
||||
* @param {boolean} [fForce] (true to force a video update; used by the Debugger)
|
||||
*/
|
||||
CPUPDP11.prototype.updateCPU = function(fForce)
|
||||
{
|
||||
if (this.cmp) {
|
||||
this.cmp.updateStatus(fForce);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* yieldCPU()
|
||||
*
|
||||
|
|
@ -1272,10 +1193,10 @@ CPUPDP11.prototype.yieldCPU = function()
|
|||
// if (DEBUG) this.nSnapCycles = this.nBurstCycles;
|
||||
/*
|
||||
* The Debugger calls yieldCPU() after every message() to ensure browser responsiveness, but it looks
|
||||
* odd for those messages to show CPU state changes but for the CPU's own status display to not (ditto
|
||||
* for the Video display), so I've added this call to try to keep things looking synchronized.
|
||||
* odd for those messages to show CPU state changes if the Control Panel, Video display, etc, does not,
|
||||
* so I've added this call to try to keep things looking synchronized.
|
||||
*/
|
||||
this.updateCPU();
|
||||
this.cmp.updateStatus();
|
||||
};
|
||||
|
||||
if (NODE) module.exports = CPUPDP11;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
/**
|
||||
* @fileoverview Implements PDP11 opcode handlers.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Sep-03
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
||||
* may be used freely provided the original author name is acknowledged in any modified source code.
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of September 2016 at <http://skn.noip.me/pdp11/pdp11.html>. This code
|
||||
* may be used freely provided the original authors are acknowledged in any modified source code.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -21,9 +20,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -38,10 +37,12 @@ if (NODE) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Decoding starts at the bottom of this file, in op1170(). The basic decoding approach is to
|
||||
* dispatch on the top 4 bits of the opcode, and if further decoding is required, the dispatched
|
||||
* function will dispatch on the next 4 bits, and so on (although some of the intermediate levels
|
||||
* dispatch only on 2 bits, which could also handled with a switch statement).
|
||||
* Decoding starts at the bottom of this file, in op1120() and op1145().
|
||||
*
|
||||
* The basic decoding approach is to dispatch on the top 4 bits of the opcode, and if further
|
||||
* decoding is required, the dispatched function will dispatch on the next 4 bits, and so on
|
||||
* (although some of the intermediate levels dispatch only on 2 bits, which could also be handled
|
||||
* with a switch statement).
|
||||
*
|
||||
* Eventually, every opcode should end up either in an opXXX() function or opUndefined(). For
|
||||
* opcodes that perform a simple read and/or write operation, the entire operation is handled by
|
||||
|
|
@ -1040,6 +1041,20 @@ PDP11.opDECB = function(opCode)
|
|||
/**
|
||||
* opDIV(opCode)
|
||||
*
|
||||
* The instruction "DIV SRC,Rn" determines SRC using the DSTMODE portion of the opcode and Rn using
|
||||
* the SRCMODE portion; Rn can only be a register (and it should be an EVEN-numbered register, lest you
|
||||
* get unexpected results). The dividend (DST) is then calculated as:
|
||||
*
|
||||
* DST = (regs[Rn] << 16) | (regs[Rn|1])
|
||||
*
|
||||
* DST is divided by SRC, and the quotient is stored in regs[Rn] and the remainder in regs[Rn|1].
|
||||
*
|
||||
* For example:
|
||||
*
|
||||
* DIV R4,R0
|
||||
*
|
||||
* where R4 = 006400 and R0,R1 = 000000,015000 will result in R0,R1 = 000002,000000.
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
|
|
@ -1102,7 +1117,7 @@ PDP11.opHALT = function(opCode)
|
|||
this.regErr |= PDP11.CPUERR.BADHALT;
|
||||
this.trap(PDP11.TRAP.BUS_ERROR, PDP11.REASON.HALT);
|
||||
} else {
|
||||
this.endBurst();
|
||||
this.stopCPU();
|
||||
}
|
||||
this.nStepCycles -= 7;
|
||||
};
|
||||
|
|
@ -1202,7 +1217,7 @@ PDP11.opJSR = function(opCode)
|
|||
PDP11.opMARK = function(opCode)
|
||||
{
|
||||
var addr = (this.getPC() + ((opCode & 0x3F) << 1)) & 0xffff;
|
||||
var src = this.readWordFromVirtual(addr | 0x10000);
|
||||
var src = this.readWord(addr | this.addrDSpace);
|
||||
this.setPC(this.regsGen[5]);
|
||||
this.setSP(addr + 2);
|
||||
this.regsGen[5] = src;
|
||||
|
|
@ -1693,7 +1708,7 @@ PDP11.opWAIT = function(opCode)
|
|||
/*
|
||||
* The original PDP-11 emulation code would actually stop emulating instructions now, relying on assorted
|
||||
* setTimeout() callbacks, setInterval() callbacks, device XHR (XMLHttpRequest) callbacks, etc, to eventually
|
||||
* call interrupt(), which would then transition the CPU's runState from 2 to 0 and kickstart emulate() again.
|
||||
* call interrupt(), which would then transition the CPU of its "wait" state and kickstart emulate() again.
|
||||
*
|
||||
* That approach isn't compatible with PCjs emulators, which prefer to rely on the simulated CPU clock to
|
||||
* drive all simulated device updates. This means components should call the CPU's setTimer() function, which
|
||||
|
|
@ -1704,9 +1719,9 @@ PDP11.opWAIT = function(opCode)
|
|||
* However, the PCjs approach requires the CPU to continue running. One simple solution to this dilemma:
|
||||
*
|
||||
* 1) opWAIT() sets a new opFlags bit (OPFLAG.WAIT)
|
||||
* 2) Rewind PC back to WAIT
|
||||
* 3) Whenever stepCPU() detects OPFLAG.WAIT, call checkInterruptQueue()
|
||||
* 4) If checkInterruptQueue() detects an interrupt, advance PC past WAIT before dispatching it
|
||||
* 2) Rewind the PC back to the WAIT instruction
|
||||
* 3) Whenever stepCPU() detects OPFLAG.WAIT, call checkInterrupts()
|
||||
* 4) If checkInterrupts() detects an interrupt, advance PC past the WAIT and then dispatch the interrupt
|
||||
*
|
||||
* Technically, the PC is already exactly where it's supposed to be, so why are we wasting time with steps
|
||||
* 2 and 4? It's largely for the Debugger's sake, so that as long as execution is "blocked" by a WAIT, that's
|
||||
|
|
@ -1717,6 +1732,12 @@ PDP11.opWAIT = function(opCode)
|
|||
* check can have a measurable (negative) impact on performance. Which is why it's important to use opFlags bits
|
||||
* whenever possible, since we can test for multiple (up to 32) exceptional conditions with a single check.
|
||||
*/
|
||||
if (!(this.opFlags & PDP11.OPFLAG.WAIT)) {
|
||||
/*
|
||||
* Since here we're actually transitioning to WAIT, let's update the Panel's LEDs (well, OK, among other things).
|
||||
*/
|
||||
this.cmp.updateStatus();
|
||||
}
|
||||
this.opFlags |= PDP11.OPFLAG.WAIT;
|
||||
this.advancePC(-2);
|
||||
this.nStepCycles -= 3;
|
||||
|
|
@ -1742,289 +1763,241 @@ PDP11.opXOR = function(opCode)
|
|||
*/
|
||||
PDP11.opUndefined = function(opCode)
|
||||
{
|
||||
if (DEBUGGER && this.dbg) {
|
||||
if (this.dbg.undefinedInstruction(opCode)) return;
|
||||
}
|
||||
this.trap(PDP11.TRAP.RESERVED, PDP11.REASON.RESERVED);
|
||||
};
|
||||
|
||||
/**
|
||||
* op0Xnn_1170(opCode)
|
||||
* op1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op0Xnn_1170 = function(opCode)
|
||||
PDP11.op1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps0Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode);
|
||||
PDP11.aOpXnnn_1120[opCode >> 12].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op0AXn_1170(opCode)
|
||||
* op0Xnn_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op0AXn_1170 = function(opCode)
|
||||
PDP11.op0Xnn_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps0AXn_1170[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
PDP11.aOp0Xnn_1120[(opCode >> 8) & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op0BXn_1170(opCode)
|
||||
* op0AXn_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op0BXn_1170 = function(opCode)
|
||||
PDP11.op0AXn_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps0BXn_1170[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
PDP11.aOp0AXn_1120[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op0CXn_1170(opCode)
|
||||
* op0BXn_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op0CXn_1170 = function(opCode)
|
||||
PDP11.op0BXn_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps0CXn_1170[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
PDP11.aOp0BXn_1120[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op0DXn_1170(opCode)
|
||||
* op0CXn_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op0DXn_1170 = function(opCode)
|
||||
PDP11.op0CXn_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps0DXn_1170[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
PDP11.aOp0CXn_1120[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op00Xn_1170(opCode)
|
||||
* op00Xn_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op00Xn_1170 = function(opCode)
|
||||
PDP11.op00Xn_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps00Xn_1170[(opCode >> 4) & 0xf].call(this, opCode);
|
||||
PDP11.aOp00Xn_1120[(opCode >> 4) & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op008X_1170(opCode)
|
||||
* op00AX_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op008X_1170 = function(opCode)
|
||||
PDP11.op00AX_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps00AX_1170[opCode & 0xf].call(this, opCode);
|
||||
PDP11.aOp00AX_1120[opCode & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op00AX_1170(opCode)
|
||||
* op00BX_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op00AX_1170 = function(opCode)
|
||||
PDP11.op00BX_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps00AX_1170[opCode & 0xf].call(this, opCode);
|
||||
PDP11.aOp00BX_1120[opCode & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op00BX_1170(opCode)
|
||||
* op000X_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op00BX_1170 = function(opCode)
|
||||
PDP11.op000X_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps00BX_1170[opCode & 0xf].call(this, opCode);
|
||||
PDP11.aOp000X_1120[opCode & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op000X_1170(opCode)
|
||||
* op8Xnn_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op000X_1170 = function(opCode)
|
||||
PDP11.op8Xnn_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps000X_1170[opCode & 0xf].call(this, opCode);
|
||||
PDP11.aOp8Xnn_1120[(opCode >> 8) & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op7Xnn_1170(opCode)
|
||||
* op8AXn_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op7Xnn_1170 = function(opCode)
|
||||
PDP11.op8AXn_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps7Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode);
|
||||
PDP11.aOp8AXn_1120[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op8Xnn_1170(opCode)
|
||||
* op8BXn_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op8Xnn_1170 = function(opCode)
|
||||
PDP11.op8BXn_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps8Xnn_1170[(opCode >> 8) & 0xf].call(this, opCode);
|
||||
PDP11.aOp8BXn_1120[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op8AXn_1170(opCode)
|
||||
* op8CXn_1120(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op8AXn_1170 = function(opCode)
|
||||
PDP11.op8CXn_1120 = function(opCode)
|
||||
{
|
||||
PDP11.aOps8AXn_1170[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
PDP11.aOp8CXn_1120[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op8BXn_1170(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op8BXn_1170 = function(opCode)
|
||||
{
|
||||
PDP11.aOps8BXn_1170[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op8CXn_1170(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op8CXn_1170 = function(opCode)
|
||||
{
|
||||
PDP11.aOps8CXn_1170[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op8DXn_1170(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op8DXn_1170 = function(opCode)
|
||||
{
|
||||
PDP11.aOps8DXn_1170[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op1170(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op1170 = function(opCode)
|
||||
{
|
||||
PDP11.aOpsXnnn_1170[opCode >> 12].call(this, opCode);
|
||||
};
|
||||
|
||||
PDP11.aOpsXnnn_1170 = [
|
||||
PDP11.op0Xnn_1170, // 0x0nnn
|
||||
PDP11.opMOV, // 0x1nnn 01SSDD
|
||||
PDP11.opCMP, // 0x2nnn 02SSDD
|
||||
PDP11.opBIT, // 0x3nnn 03SSDD
|
||||
PDP11.opBIC, // 0x4nnn 04SSDD
|
||||
PDP11.opBIS, // 0x5nnn 05SSDD
|
||||
PDP11.opADD, // 0x6nnn 06SSDD
|
||||
PDP11.op7Xnn_1170, // 0x7nnn
|
||||
PDP11.op8Xnn_1170, // 0x8nnn
|
||||
PDP11.opMOVB, // 0x9nnn 11SSDD
|
||||
PDP11.opCMPB, // 0xAnnn 12SSDD
|
||||
PDP11.opBITB, // 0xBnnn 13SSDD
|
||||
PDP11.opBICB, // 0xCnnn 14SSDD
|
||||
PDP11.opBISB, // 0xDnnn 15SSDD
|
||||
PDP11.opSUB, // 0xEnnn 16SSDD
|
||||
PDP11.aOpXnnn_1120 = [
|
||||
PDP11.op0Xnn_1120, // 0x0nnn
|
||||
PDP11.opMOV, // 0x1nnn 01SSDD 11/20+ 2.3
|
||||
PDP11.opCMP, // 0x2nnn 02SSDD 11/20+ 2.3*
|
||||
PDP11.opBIT, // 0x3nnn 03SSDD 11/20+ 2.9*
|
||||
PDP11.opBIC, // 0x4nnn 04SSDD 11/20+ 2.9
|
||||
PDP11.opBIS, // 0x5nnn 05SSDD 11/20+ 2.3
|
||||
PDP11.opADD, // 0x6nnn 06SSDD 11/20+ 2.3
|
||||
PDP11.opUndefined, // 0x7nnn
|
||||
PDP11.op8Xnn_1120, // 0x8nnn
|
||||
PDP11.opMOVB, // 0x9nnn 11SSDD 11/20+ 2.3
|
||||
PDP11.opCMPB, // 0xAnnn 12SSDD 11/20+ 2.3
|
||||
PDP11.opBITB, // 0xBnnn 13SSDD 11/20+ 2.9
|
||||
PDP11.opBICB, // 0xCnnn 14SSDD 11/20+ 2.9
|
||||
PDP11.opBISB, // 0xDnnn 15SSDD 11/20+ 2.3
|
||||
PDP11.opSUB, // 0xEnnn 16SSDD 11/20+ 2.3
|
||||
PDP11.opUndefined // 0xFnnn
|
||||
];
|
||||
|
||||
PDP11.aOps0Xnn_1170 = [
|
||||
PDP11.op00Xn_1170, // 0x00nn
|
||||
PDP11.opBR, // 0x01nn
|
||||
PDP11.opBNE, // 0x02nn
|
||||
PDP11.opBEQ, // 0x03nn
|
||||
PDP11.opBGE, // 0x04nn
|
||||
PDP11.opBLT, // 0x05nn
|
||||
PDP11.opBGT, // 0x06nn
|
||||
PDP11.opBLE, // 0x07nn
|
||||
PDP11.opJSR, // 0x08nn
|
||||
PDP11.opJSR, // 0x09nn
|
||||
PDP11.op0AXn_1170, // 0x0Ann
|
||||
PDP11.op0BXn_1170, // 0x0Bnn
|
||||
PDP11.op0CXn_1170, // 0x0Cnn
|
||||
PDP11.op0DXn_1170, // 0x0Dnn
|
||||
PDP11.aOp0Xnn_1120 = [
|
||||
PDP11.op00Xn_1120, // 0x00nn
|
||||
PDP11.opBR, // 0x01nn 0004XX 11/20+ 2.6
|
||||
PDP11.opBNE, // 0x02nn 0010XX 11/20+ 2.6**
|
||||
PDP11.opBEQ, // 0x03nn 0014XX 11/20+ 2.6**
|
||||
PDP11.opBGE, // 0x04nn 0020XX 11/20+ 2.6**
|
||||
PDP11.opBLT, // 0x05nn 0024XX 11/20+ 2.6**
|
||||
PDP11.opBGT, // 0x06nn 0030XX 11/20+ 2.6**
|
||||
PDP11.opBLE, // 0x07nn 0034XX 11/20+ 2.6**
|
||||
PDP11.opJSR, // 0x08nn 004RDD 11/20+ 4.4
|
||||
PDP11.opJSR, // 0x09nn 004RDD 11/20+ 4.4
|
||||
PDP11.op0AXn_1120, // 0x0Ann
|
||||
PDP11.op0BXn_1120, // 0x0Bnn
|
||||
PDP11.op0CXn_1120, // 0x0Cnn
|
||||
PDP11.opUndefined, // 0x0Dnn
|
||||
PDP11.opUndefined, // 0x0Enn
|
||||
PDP11.opUndefined // 0x0Fnn
|
||||
];
|
||||
|
||||
PDP11.aOps0AXn_1170 = [
|
||||
PDP11.opCLR, // 0x0A0n
|
||||
PDP11.opCOM, // 0x0A4n
|
||||
PDP11.opINC, // 0x0A8n
|
||||
PDP11.opDEC // 0x0ACn
|
||||
PDP11.aOp0AXn_1120 = [
|
||||
PDP11.opCLR, // 0x0A0n 0050DD 11/20+ 2.3
|
||||
PDP11.opCOM, // 0x0A4n 0051DD 11/20+ 2.3
|
||||
PDP11.opINC, // 0x0A8n 0052DD 11/20+ 2.3
|
||||
PDP11.opDEC // 0x0ACn 0053DD 11/20+ 2.3
|
||||
];
|
||||
|
||||
PDP11.aOps0BXn_1170 = [
|
||||
PDP11.opNEG, // 0x0B0n
|
||||
PDP11.opADC, // 0x0B4n
|
||||
PDP11.opSBC, // 0x0B8n
|
||||
PDP11.opTST // 0x0BCn
|
||||
PDP11.aOp0BXn_1120 = [
|
||||
PDP11.opNEG, // 0x0B0n 0054DD 11/20+ 2.3
|
||||
PDP11.opADC, // 0x0B4n 0055DD 11/20+ 2.3
|
||||
PDP11.opSBC, // 0x0B8n 0056DD 11/20+ 2.3
|
||||
PDP11.opTST // 0x0BCn 0057DD 11/20+ 2.3*
|
||||
];
|
||||
|
||||
PDP11.aOps0CXn_1170 = [
|
||||
PDP11.opROR, // 0x0C0n
|
||||
PDP11.opROL, // 0x0C4n
|
||||
PDP11.opASR, // 0x0C8n
|
||||
PDP11.opASL // 0x0CCn
|
||||
PDP11.aOp0CXn_1120 = [
|
||||
PDP11.opROR, // 0x0C0n 0060DD 11/20+ 2.3*
|
||||
PDP11.opROL, // 0x0C4n 0061DD 11/20+ 2.3*
|
||||
PDP11.opASR, // 0x0C8n 0062DD 11/20+ 2.3*
|
||||
PDP11.opASL // 0x0CCn 0063DD 11/20+ 2.3*
|
||||
];
|
||||
|
||||
PDP11.aOps0DXn_1170 = [
|
||||
PDP11.opMARK, // 0x0D0n
|
||||
PDP11.opMFPI, // 0x0D4n
|
||||
PDP11.opMTPI, // 0x0D8n
|
||||
PDP11.opSXT // 0x0DCn
|
||||
];
|
||||
|
||||
PDP11.aOps00Xn_1170 = [
|
||||
PDP11.op000X_1170, // 0x000n 000000-000017
|
||||
PDP11.aOp00Xn_1120 = [
|
||||
PDP11.op000X_1120, // 0x000n 000000-000017
|
||||
PDP11.opUndefined, // 0x001n 000020-000037
|
||||
PDP11.opUndefined, // 0x002n 000040-000057
|
||||
PDP11.opUndefined, // 0x003n 000060-000077
|
||||
PDP11.opJMP, // 0x004n 0001DD
|
||||
PDP11.opJMP, // 0x005n 0001DD
|
||||
PDP11.opJMP, // 0x006n 0001DD
|
||||
PDP11.opJMP, // 0x007n 0001DD
|
||||
PDP11.opRTS, // 0x008n 00020R (opRTS() will also confirm that bit 3 is clear)
|
||||
PDP11.opSPL, // 0x009n 00023N (opSPL() will also confirm that bit 3 is set)
|
||||
PDP11.op00AX_1170, // 0x00An 000240-000257
|
||||
PDP11.op00BX_1170, // 0x00Bn 000260-000277
|
||||
PDP11.opSWAB, // 0x00Cn 0003DD
|
||||
PDP11.opSWAB, // 0x00Dn 0003DD
|
||||
PDP11.opSWAB, // 0x00En 0003DD
|
||||
PDP11.opSWAB // 0x00Fn 0003DD
|
||||
PDP11.opJMP, // 0x004n 0001DD 11/20+ 1.2
|
||||
PDP11.opJMP, // 0x005n 0001DD 11/20+ 1.2
|
||||
PDP11.opJMP, // 0x006n 0001DD 11/20+ 1.2
|
||||
PDP11.opJMP, // 0x007n 0001DD 11/20+ 1.2
|
||||
PDP11.opRTS, // 0x008n 00020R 11/20+ 3.5 (opRTS() will also confirm that bit 3 is clear)
|
||||
PDP11.opUndefined, // 0x009n 00023N
|
||||
PDP11.op00AX_1120, // 0x00An 000240-000257
|
||||
PDP11.op00BX_1120, // 0x00Bn 000260-000277
|
||||
PDP11.opSWAB, // 0x00Cn 0003DD 11/20+ 2.3
|
||||
PDP11.opSWAB, // 0x00Dn 0003DD 11/20+ 2.3
|
||||
PDP11.opSWAB, // 0x00En 0003DD 11/20+ 2.3
|
||||
PDP11.opSWAB // 0x00Fn 0003DD 11/20+ 2.3
|
||||
];
|
||||
|
||||
PDP11.aOps000X_1170 = [
|
||||
PDP11.opHALT, // 0x0000 000000
|
||||
PDP11.opWAIT, // 0x0001 000001
|
||||
PDP11.opRTI, // 0x0002 000002
|
||||
PDP11.opBPT, // 0x0003 000003
|
||||
PDP11.opIOT, // 0x0004 000004
|
||||
PDP11.opRESET, // 0x0005 000005
|
||||
PDP11.opRTT, // 0x0006 000006
|
||||
PDP11.aOp000X_1120 = [
|
||||
PDP11.opHALT, // 0x0000 000000 11/20+ 1.8
|
||||
PDP11.opWAIT, // 0x0001 000001 11/20+ 1.8
|
||||
PDP11.opRTI, // 0x0002 000002 11/20+ 4.8
|
||||
PDP11.opBPT, // 0x0003
|
||||
PDP11.opIOT, // 0x0004 000004 11/20+ 9.3
|
||||
PDP11.opRESET, // 0x0005 000005 11/20+ 20ms
|
||||
PDP11.opUndefined, // 0x0006
|
||||
PDP11.opUndefined, // 0x0007
|
||||
PDP11.opUndefined, // 0x0008
|
||||
PDP11.opUndefined, // 0x0009
|
||||
|
|
@ -2036,106 +2009,296 @@ PDP11.aOps000X_1170 = [
|
|||
PDP11.opUndefined // 0x000F
|
||||
];
|
||||
|
||||
PDP11.aOps00AX_1170 = [
|
||||
PDP11.opNOP, // 0x00A0 000240
|
||||
PDP11.opCLC, // 0x00A1
|
||||
PDP11.opCLV, // 0x00A2
|
||||
PDP11.opCLx, // 0x00A3
|
||||
PDP11.opCLZ, // 0x00A4
|
||||
PDP11.opCLx, // 0x00A5
|
||||
PDP11.opCLx, // 0x00A6
|
||||
PDP11.opCLx, // 0x00A7
|
||||
PDP11.opCLN, // 0x00A8
|
||||
PDP11.opCLx, // 0x00A9
|
||||
PDP11.opCLx, // 0x00AA
|
||||
PDP11.opCLx, // 0x00AB
|
||||
PDP11.opCLx, // 0x00AC
|
||||
PDP11.opCLx, // 0x00AD
|
||||
PDP11.opCLx, // 0x00AE
|
||||
PDP11.opCLx // 0x00AF 000257
|
||||
PDP11.aOp00AX_1120 = [
|
||||
PDP11.opNOP, // 0x00A0 000240 11/20+ 1.5
|
||||
PDP11.opCLC, // 0x00A1 000241 11/20+ 1.5
|
||||
PDP11.opCLV, // 0x00A2 000242 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00A3 000243 11/20+ 1.5
|
||||
PDP11.opCLZ, // 0x00A4 000244 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00A5 000245 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00A6 000246 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00A7 000247 11/20+ 1.5
|
||||
PDP11.opCLN, // 0x00A8 000250 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00A9 000251 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00AA 000252 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00AB 000253 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00AC 000254 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00AD 000255 11/20+ 1.5
|
||||
PDP11.opCLx, // 0x00AE 000256 11/20+ 1.5
|
||||
PDP11.opCLx // 0x00AF 000257 11/20+ 1.5
|
||||
];
|
||||
|
||||
PDP11.aOps00BX_1170 = [
|
||||
PDP11.opNOP, // 0x00B0 000260
|
||||
PDP11.opSEC, // 0x00B1
|
||||
PDP11.opSEV, // 0x00B2
|
||||
PDP11.opSEx, // 0x00B3
|
||||
PDP11.opSEZ, // 0x00B4
|
||||
PDP11.opSEx, // 0x00B5
|
||||
PDP11.opSEx, // 0x00B6
|
||||
PDP11.opSEx, // 0x00B7
|
||||
PDP11.opSEN, // 0x00B8
|
||||
PDP11.opSEx, // 0x00B9
|
||||
PDP11.opSEx, // 0x00BA
|
||||
PDP11.opSEx, // 0x00BB
|
||||
PDP11.opSEx, // 0x00BC
|
||||
PDP11.opSEx, // 0x00BD
|
||||
PDP11.opSEx, // 0x00BE
|
||||
PDP11.opSEx // 0x00BF 000277
|
||||
PDP11.aOp00BX_1120 = [
|
||||
PDP11.opNOP, // 0x00B0 000260 11/20+ 1.5
|
||||
PDP11.opSEC, // 0x00B1 000261 11/20+ 1.5
|
||||
PDP11.opSEV, // 0x00B2 000262 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00B3 000263 11/20+ 1.5
|
||||
PDP11.opSEZ, // 0x00B4 000264 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00B5 000265 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00B6 000266 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00B7 000267 11/20+ 1.5
|
||||
PDP11.opSEN, // 0x00B8 000270 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00B9 000271 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00BA 000272 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00BB 000273 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00BC 000274 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00BD 000275 11/20+ 1.5
|
||||
PDP11.opSEx, // 0x00BE 000276 11/20+ 1.5
|
||||
PDP11.opSEx // 0x00BF 000277 11/20+ 1.5
|
||||
];
|
||||
|
||||
PDP11.aOps7Xnn_1170 = [
|
||||
PDP11.opMUL, // 0x70nn
|
||||
PDP11.opMUL, // 0x71nn
|
||||
PDP11.opDIV, // 0x72nn
|
||||
PDP11.opDIV, // 0x73nn
|
||||
PDP11.opASH, // 0x74nn
|
||||
PDP11.opASH, // 0x75nn
|
||||
PDP11.opASHC, // 0x76nn
|
||||
PDP11.opASHC, // 0x77nn
|
||||
PDP11.opXOR, // 0x78nn
|
||||
PDP11.opXOR, // 0x79nn
|
||||
PDP11.opUndefined, // 0x7Ann
|
||||
PDP11.opUndefined, // 0x7Bnn
|
||||
PDP11.opUndefined, // 0x7Cnn
|
||||
PDP11.opUndefined, // 0x7Dnn
|
||||
PDP11.opSOB, // 0x7Enn
|
||||
PDP11.opSOB // 0x7Fnn
|
||||
];
|
||||
|
||||
PDP11.aOps8Xnn_1170 = [
|
||||
PDP11.opBPL, // 0x80nn
|
||||
PDP11.opBMI, // 0x81nn
|
||||
PDP11.opBHI, // 0x82nn
|
||||
PDP11.opBLOS, // 0x83nn
|
||||
PDP11.opBVC, // 0x84nn
|
||||
PDP11.opBVS, // 0x85nn
|
||||
PDP11.opBCC, // 0x86nn
|
||||
PDP11.opBCS, // 0x87nn
|
||||
PDP11.opEMT, // 0x88nn
|
||||
PDP11.opTRAP, // 0x89nn
|
||||
PDP11.op8AXn_1170, // 0x8Ann
|
||||
PDP11.op8BXn_1170, // 0x8Bnn
|
||||
PDP11.op8CXn_1170, // 0x8Cnn
|
||||
PDP11.op8DXn_1170, // 0x8Dnn
|
||||
PDP11.aOp8Xnn_1120 = [
|
||||
PDP11.opBPL, // 0x80nn 1000XX 11/20+ 2.6**
|
||||
PDP11.opBMI, // 0x81nn 1004XX 11/20+ 2.6**
|
||||
PDP11.opBHI, // 0x82nn 1010XX 11/20+ 2.6**
|
||||
PDP11.opBLOS, // 0x83nn 1014XX 11/20+ 2.6**
|
||||
PDP11.opBVC, // 0x84nn 1020XX 11/20+ 2.6**
|
||||
PDP11.opBVS, // 0x85nn 1024XX 11/20+ 2.6**
|
||||
PDP11.opBCC, // 0x86nn 1030XX 11/20+ 2.6**
|
||||
PDP11.opBCS, // 0x87nn 1034XX 11/20+ 2.6**
|
||||
PDP11.opEMT, // 0x88nn 104000-104377 11/20+ 9.3
|
||||
PDP11.opTRAP, // 0x89nn 104400-104777 11/20+ 9.3
|
||||
PDP11.op8AXn_1120, // 0x8Ann
|
||||
PDP11.op8BXn_1120, // 0x8Bnn
|
||||
PDP11.op8CXn_1120, // 0x8Cnn
|
||||
PDP11.opUndefined, // 0x8Dnn
|
||||
PDP11.opUndefined, // 0x8Enn
|
||||
PDP11.opUndefined // 0x8Fnn
|
||||
];
|
||||
|
||||
PDP11.aOps8AXn_1170 = [
|
||||
PDP11.opCLRB, // 0x8A0n
|
||||
PDP11.opCOMB, // 0x8A4n
|
||||
PDP11.opINCB, // 0x8A8n
|
||||
PDP11.opDECB // 0x8ACn
|
||||
PDP11.aOp8AXn_1120 = [
|
||||
PDP11.opCLRB, // 0x8A0n 1050DD 11/20+ 2.3
|
||||
PDP11.opCOMB, // 0x8A4n 1051DD 11/20+ 2.3
|
||||
PDP11.opINCB, // 0x8A8n 1052DD 11/20+ 2.3
|
||||
PDP11.opDECB // 0x8ACn 1053DD 11/20+ 2.3
|
||||
];
|
||||
|
||||
PDP11.aOps8BXn_1170 = [
|
||||
PDP11.opNEGB, // 0x8B0n
|
||||
PDP11.opADCB, // 0x8B4n
|
||||
PDP11.opSBCB, // 0x8B8n
|
||||
PDP11.opTSTB // 0x8BCn
|
||||
PDP11.aOp8BXn_1120 = [
|
||||
PDP11.opNEGB, // 0x8B0n 1054DD 11/20+ 2.3
|
||||
PDP11.opADCB, // 0x8B4n 1055DD 11/20+ 2.3
|
||||
PDP11.opSBCB, // 0x8B8n 1056DD 11/20+ 2.3
|
||||
PDP11.opTSTB // 0x8BCn 1057DD 11/20+ 2.3*
|
||||
];
|
||||
|
||||
PDP11.aOps8CXn_1170 = [
|
||||
PDP11.opRORB, // 0x8C0n
|
||||
PDP11.opROLB, // 0x8C4n
|
||||
PDP11.opASRB, // 0x8C8n
|
||||
PDP11.opASLB // 0x8CCn
|
||||
PDP11.aOp8CXn_1120 = [
|
||||
PDP11.opRORB, // 0x8C0n 1060DD 11/20+ 2.3*
|
||||
PDP11.opROLB, // 0x8C4n 1061DD 11/20+ 2.3*
|
||||
PDP11.opASRB, // 0x8C8n 1062DD 11/20+ 2.3*
|
||||
PDP11.opASLB // 0x8CCn 1063DD 11/20+ 2.3*
|
||||
];
|
||||
|
||||
PDP11.aOps8DXn_1170 = [
|
||||
/**
|
||||
* op1145(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op1145 = function(opCode)
|
||||
{
|
||||
PDP11.aOpXnnn_1145[opCode >> 12].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op0Xnn_1145(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op0Xnn_1145 = function(opCode)
|
||||
{
|
||||
PDP11.aOp0Xnn_1145[(opCode >> 8) & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op0DXn_1145(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op0DXn_1145 = function(opCode)
|
||||
{
|
||||
PDP11.aOp0DXn_1145[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op00Xn_1145(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op00Xn_1145 = function(opCode)
|
||||
{
|
||||
PDP11.aOp00Xn_1145[(opCode >> 4) & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op000X_1145(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op000X_1145 = function(opCode)
|
||||
{
|
||||
PDP11.aOp000X_1145[opCode & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op7Xnn_1145(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op7Xnn_1145 = function(opCode)
|
||||
{
|
||||
PDP11.aOp7Xnn_1145[(opCode >> 8) & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op8Xnn_1145(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op8Xnn_1145 = function(opCode)
|
||||
{
|
||||
PDP11.aOp8Xnn_1145[(opCode >> 8) & 0xf].call(this, opCode);
|
||||
};
|
||||
|
||||
/**
|
||||
* op8DXn_1145(opCode)
|
||||
*
|
||||
* @this {CPUStatePDP11}
|
||||
* @param {number} opCode
|
||||
*/
|
||||
PDP11.op8DXn_1145 = function(opCode)
|
||||
{
|
||||
PDP11.aOp8DXn_1145[(opCode >> 6) & 0x3].call(this, opCode);
|
||||
};
|
||||
|
||||
PDP11.aOpXnnn_1145 = [
|
||||
PDP11.op0Xnn_1145, // 0x0nnn
|
||||
PDP11.opMOV, // 0x1nnn 01SSDD 11/20+ 2.3
|
||||
PDP11.opCMP, // 0x2nnn 02SSDD 11/20+ 2.3*
|
||||
PDP11.opBIT, // 0x3nnn 03SSDD 11/20+ 2.9*
|
||||
PDP11.opBIC, // 0x4nnn 04SSDD 11/20+ 2.9
|
||||
PDP11.opBIS, // 0x5nnn 05SSDD 11/20+ 2.3
|
||||
PDP11.opADD, // 0x6nnn 06SSDD 11/20+ 2.3
|
||||
PDP11.op7Xnn_1145, // 0x7nnn
|
||||
PDP11.op8Xnn_1145, // 0x8nnn
|
||||
PDP11.opMOVB, // 0x9nnn 11SSDD 11/20+ 2.3
|
||||
PDP11.opCMPB, // 0xAnnn 12SSDD 11/20+ 2.3
|
||||
PDP11.opBITB, // 0xBnnn 13SSDD 11/20+ 2.9
|
||||
PDP11.opBICB, // 0xCnnn 14SSDD 11/20+ 2.9
|
||||
PDP11.opBISB, // 0xDnnn 15SSDD 11/20+ 2.3
|
||||
PDP11.opSUB, // 0xEnnn 16SSDD 11/20+ 2.3
|
||||
PDP11.opUndefined // 0xFnnn
|
||||
];
|
||||
|
||||
PDP11.aOp0Xnn_1145 = [
|
||||
PDP11.op00Xn_1145, // 0x00nn
|
||||
PDP11.opBR, // 0x01nn 0004XX 11/20+ 2.6
|
||||
PDP11.opBNE, // 0x02nn 0010XX 11/20+ 2.6**
|
||||
PDP11.opBEQ, // 0x03nn 0014XX 11/20+ 2.6**
|
||||
PDP11.opBGE, // 0x04nn 0020XX 11/20+ 2.6**
|
||||
PDP11.opBLT, // 0x05nn 0024XX 11/20+ 2.6**
|
||||
PDP11.opBGT, // 0x06nn 0030XX 11/20+ 2.6**
|
||||
PDP11.opBLE, // 0x07nn 0034XX 11/20+ 2.6**
|
||||
PDP11.opJSR, // 0x08nn 004RDD 11/20+ 4.4
|
||||
PDP11.opJSR, // 0x09nn 004RDD 11/20+ 4.4
|
||||
PDP11.op0AXn_1120, // 0x0Ann
|
||||
PDP11.op0BXn_1120, // 0x0Bnn
|
||||
PDP11.op0CXn_1120, // 0x0Cnn
|
||||
PDP11.op0DXn_1145, // 0x0Dnn
|
||||
PDP11.opUndefined, // 0x0Enn
|
||||
PDP11.opUndefined // 0x0Fnn
|
||||
];
|
||||
|
||||
PDP11.aOp0DXn_1145 = [
|
||||
PDP11.opMARK, // 0x0D0n 11/45+
|
||||
PDP11.opMFPI, // 0x0D4n 11/45+
|
||||
PDP11.opMTPI, // 0x0D8n 11/45+
|
||||
PDP11.opSXT // 0x0DCn 11/45+
|
||||
];
|
||||
|
||||
PDP11.aOp00Xn_1145 = [
|
||||
PDP11.op000X_1145, // 0x000n 000000-000017
|
||||
PDP11.opUndefined, // 0x001n 000020-000037
|
||||
PDP11.opUndefined, // 0x002n 000040-000057
|
||||
PDP11.opUndefined, // 0x003n 000060-000077
|
||||
PDP11.opJMP, // 0x004n 0001DD 11/20+ 1.2
|
||||
PDP11.opJMP, // 0x005n 0001DD 11/20+ 1.2
|
||||
PDP11.opJMP, // 0x006n 0001DD 11/20+ 1.2
|
||||
PDP11.opJMP, // 0x007n 0001DD 11/20+ 1.2
|
||||
PDP11.opRTS, // 0x008n 00020R 11/20+ 3.5 (opRTS() will also confirm that bit 3 is clear)
|
||||
PDP11.opSPL, // 0x009n 00023N 11/45+ (opSPL() will also confirm that bit 3 is set)
|
||||
PDP11.op00AX_1120, // 0x00An 000240-000257
|
||||
PDP11.op00BX_1120, // 0x00Bn 000260-000277
|
||||
PDP11.opSWAB, // 0x00Cn 0003DD 11/20+ 2.3
|
||||
PDP11.opSWAB, // 0x00Dn 0003DD 11/20+ 2.3
|
||||
PDP11.opSWAB, // 0x00En 0003DD 11/20+ 2.3
|
||||
PDP11.opSWAB // 0x00Fn 0003DD 11/20+ 2.3
|
||||
];
|
||||
|
||||
PDP11.aOp000X_1145 = [
|
||||
PDP11.opHALT, // 0x0000 000000 11/20+ 1.8
|
||||
PDP11.opWAIT, // 0x0001 000001 11/20+ 1.8
|
||||
PDP11.opRTI, // 0x0002 000002 11/20+ 4.8
|
||||
PDP11.opBPT, // 0x0003 000003
|
||||
PDP11.opIOT, // 0x0004 000004 11/20+ 9.3
|
||||
PDP11.opRESET, // 0x0005 000005 11/20+ 20ms
|
||||
PDP11.opRTT, // 0x0006 000006 11/45+
|
||||
PDP11.opUndefined, // 0x0007
|
||||
PDP11.opUndefined, // 0x0008
|
||||
PDP11.opUndefined, // 0x0009
|
||||
PDP11.opUndefined, // 0x000A
|
||||
PDP11.opUndefined, // 0x000B
|
||||
PDP11.opUndefined, // 0x000C
|
||||
PDP11.opUndefined, // 0x000D
|
||||
PDP11.opUndefined, // 0x000E
|
||||
PDP11.opUndefined // 0x000F
|
||||
];
|
||||
|
||||
PDP11.aOp7Xnn_1145 = [
|
||||
PDP11.opMUL, // 0x70nn 11/45+
|
||||
PDP11.opMUL, // 0x71nn 11/45+
|
||||
PDP11.opDIV, // 0x72nn 11/45+
|
||||
PDP11.opDIV, // 0x73nn 11/45+
|
||||
PDP11.opASH, // 0x74nn 11/45+
|
||||
PDP11.opASH, // 0x75nn 11/45+
|
||||
PDP11.opASHC, // 0x76nn 11/45+
|
||||
PDP11.opASHC, // 0x77nn 11/45+
|
||||
PDP11.opXOR, // 0x78nn 11/45+
|
||||
PDP11.opXOR, // 0x79nn 11/45+
|
||||
PDP11.opUndefined, // 0x7Ann
|
||||
PDP11.opUndefined, // 0x7Bnn
|
||||
PDP11.opUndefined, // 0x7Cnn
|
||||
PDP11.opUndefined, // 0x7Dnn
|
||||
PDP11.opSOB, // 0x7Enn 11/45+
|
||||
PDP11.opSOB // 0x7Fnn 11/45+
|
||||
];
|
||||
|
||||
PDP11.aOp8Xnn_1145 = [
|
||||
PDP11.opBPL, // 0x80nn 1000XX 11/20+ 2.6**
|
||||
PDP11.opBMI, // 0x81nn 1004XX 11/20+ 2.6**
|
||||
PDP11.opBHI, // 0x82nn 1010XX 11/20+ 2.6**
|
||||
PDP11.opBLOS, // 0x83nn 1014XX 11/20+ 2.6**
|
||||
PDP11.opBVC, // 0x84nn 1020XX 11/20+ 2.6**
|
||||
PDP11.opBVS, // 0x85nn 1024XX 11/20+ 2.6**
|
||||
PDP11.opBCC, // 0x86nn 1030XX 11/20+ 2.6**
|
||||
PDP11.opBCS, // 0x87nn 1034XX 11/20+ 2.6**
|
||||
PDP11.opEMT, // 0x88nn 104000-104377 11/20+ 9.3
|
||||
PDP11.opTRAP, // 0x89nn 104400-104777 11/20+ 9.3
|
||||
PDP11.op8AXn_1120, // 0x8Ann
|
||||
PDP11.op8BXn_1120, // 0x8Bnn
|
||||
PDP11.op8CXn_1120, // 0x8Cnn
|
||||
PDP11.op8DXn_1145, // 0x8Dnn
|
||||
PDP11.opUndefined, // 0x8Enn
|
||||
PDP11.opUndefined // 0x8Fnn
|
||||
];
|
||||
|
||||
PDP11.aOp8DXn_1145 = [
|
||||
PDP11.opUndefined, // 0x8D0n
|
||||
PDP11.opMFPD, // 0x8D4n
|
||||
PDP11.opMTPD, // 0x8D8n
|
||||
PDP11.opMFPD, // 0x8D4n 11/45+
|
||||
PDP11.opMTPD, // 0x8D8n 11/45+
|
||||
PDP11.opUndefined // 0x8DCn
|
||||
];
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,14 +1,13 @@
|
|||
/**
|
||||
* @fileoverview Implements the PDP11 Debugger component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Sep-03
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
||||
* may be used freely provided the original author name is acknowledged in any modified source code.
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of September 2016 at <http://skn.noip.me/pdp11/pdp11.html>. This code
|
||||
* may be used freely provided the original authors are acknowledged in any modified source code.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -21,9 +20,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -53,12 +52,14 @@ if (DEBUGGER) {
|
|||
* DebuggerPDP11 Address Object
|
||||
*
|
||||
* addr address
|
||||
* fPhysical true if this is a physical address
|
||||
* fTemporary true if this is a temporary breakpoint address
|
||||
* sCmd set for breakpoint addresses if there's an associated command string
|
||||
* aCmds preprocessed commands (from sCmd)
|
||||
*
|
||||
* @typedef {{
|
||||
* addr:(number|undefined),
|
||||
* fPhysical:(boolean|undefined),
|
||||
* fTemporary:(boolean|undefined),
|
||||
* sCmd:(string|undefined),
|
||||
* aCmds:(Array.<string>|undefined)
|
||||
|
|
@ -244,7 +245,7 @@ if (DEBUGGER) {
|
|||
* CPU opcode names, indexed by CPU opcode ordinal (above)
|
||||
*/
|
||||
DebuggerPDP11.OPNAMES = [
|
||||
"NONE", "ADC", "ADCB", "ADD", "ASL", "ASLB", "ASR", "ASRB",
|
||||
".WORD", "ADC", "ADCB", "ADD", "ASL", "ASLB", "ASR", "ASRB",
|
||||
"BCC", "BCS", "BEQ", "BGE", "BGT", "BHI", "BIC", "BICB",
|
||||
"BIS", "BISB", "BIT", "BITB", "BLE", "BLOS", "BLT", "BMI",
|
||||
"BNE", "BPL", "BPT", "BR", "BVC", "BVS", "CCC", "CLC",
|
||||
|
|
@ -281,7 +282,7 @@ if (DEBUGGER) {
|
|||
DebuggerPDP11.OP_OTHER = 0xF000;
|
||||
|
||||
/*
|
||||
* The opTable contains opcode masks, and each mask refers to table of possible values, and each
|
||||
* The OPTABLE contains opcode masks, and each mask refers to table of possible values, and each
|
||||
* value refers to an array that contains:
|
||||
*
|
||||
* [0]: {number} of the opcode name (see OP.*)
|
||||
|
|
@ -297,7 +298,7 @@ if (DEBUGGER) {
|
|||
* that the opcode's destination operand is being listed first, but rather that the bits describing the source
|
||||
* operand are in the opcode's OP_DST field.
|
||||
*/
|
||||
DebuggerPDP11.opTable = {
|
||||
DebuggerPDP11.OPTABLE = {
|
||||
0xF000: {
|
||||
0x1000: [DebuggerPDP11.OPS.MOV, DebuggerPDP11.OP_SRC, DebuggerPDP11.OP_DST], // 01SSDD
|
||||
0x2000: [DebuggerPDP11.OPS.CMP, DebuggerPDP11.OP_SRC, DebuggerPDP11.OP_DST], // 02SSDD
|
||||
|
|
@ -424,6 +425,28 @@ if (DEBUGGER) {
|
|||
}
|
||||
};
|
||||
|
||||
DebuggerPDP11.OPNONE = [DebuggerPDP11.OPS.NONE];
|
||||
|
||||
/*
|
||||
* Table of opcodes that are specific to the 11/45 and higher
|
||||
*/
|
||||
DebuggerPDP11.OP1145 = [
|
||||
DebuggerPDP11.OPS.MARK,
|
||||
DebuggerPDP11.OPS.MFPI,
|
||||
DebuggerPDP11.OPS.MTPI,
|
||||
DebuggerPDP11.OPS.SXT,
|
||||
DebuggerPDP11.OPS.SPL,
|
||||
DebuggerPDP11.OPS.RTT,
|
||||
DebuggerPDP11.OPS.MUL,
|
||||
DebuggerPDP11.OPS.DIV,
|
||||
DebuggerPDP11.OPS.ASH,
|
||||
DebuggerPDP11.OPS.ASHC,
|
||||
DebuggerPDP11.OPS.XOR,
|
||||
DebuggerPDP11.OPS.SOB,
|
||||
DebuggerPDP11.OPS.MFPD,
|
||||
DebuggerPDP11.OPS.MTPD
|
||||
];
|
||||
|
||||
DebuggerPDP11.HISTORY_LIMIT = DEBUG? 100000 : 1000;
|
||||
|
||||
/**
|
||||
|
|
@ -447,7 +470,8 @@ if (DEBUGGER) {
|
|||
var sMessages = cmp.getMachineParm('messages');
|
||||
if (sMessages) this.messageInit(sMessages);
|
||||
|
||||
this.opTable = DebuggerPDP11.opTable;
|
||||
this.opTable = DebuggerPDP11.OPTABLE;
|
||||
this.aOpReserved = this.cpu.model < PDP11.MODEL_1145? DebuggerPDP11.OP1145 : [];
|
||||
|
||||
this.messageDump(MessagesPDP11.BUS, function onDumpBus(asArgs) { dbg.dumpBus(asArgs); });
|
||||
|
||||
|
|
@ -455,16 +479,16 @@ if (DEBUGGER) {
|
|||
};
|
||||
|
||||
/**
|
||||
* setBinding(sHTMLType, sBinding, control, sValue)
|
||||
* setBinding(sType, sBinding, control, sValue)
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas")
|
||||
* @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc)
|
||||
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "debugInput")
|
||||
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
|
||||
* @param {string} [sValue] optional data value
|
||||
* @return {boolean} true if binding was successful, false if unrecognized binding request
|
||||
*/
|
||||
DebuggerPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
|
||||
DebuggerPDP11.prototype.setBinding = function(sType, sBinding, control, sValue)
|
||||
{
|
||||
var dbg = this;
|
||||
switch (sBinding) {
|
||||
|
|
@ -588,12 +612,7 @@ if (DEBUGGER) {
|
|||
var b = 0xff;
|
||||
var addr = this.getAddr(dbgAddr, false, 1);
|
||||
if (addr !== PDP11.ADDR_INVALID) {
|
||||
this.nDisableMessages++;
|
||||
/*
|
||||
* TODO: We also need a Bus interface to disable fnAccess() calls that could trigger a trap()
|
||||
*/
|
||||
b = this.bus.getByteDirect(addr);
|
||||
this.nDisableMessages--;
|
||||
b = dbgAddr.fPhysical? this.bus.getByteDirect(addr) : this.cpu.getByteDirect(addr);
|
||||
if (inc) this.incAddr(dbgAddr, inc);
|
||||
}
|
||||
return b;
|
||||
|
|
@ -612,12 +631,7 @@ if (DEBUGGER) {
|
|||
var w = 0xffff;
|
||||
var addr = this.getAddr(dbgAddr, false, 2);
|
||||
if (addr !== PDP11.ADDR_INVALID) {
|
||||
this.nDisableMessages++;
|
||||
/*
|
||||
* TODO: We also need a Bus interface to disable fnAccess() calls that could trigger a trap()
|
||||
*/
|
||||
w = this.bus.getWordDirect(addr);
|
||||
this.nDisableMessages--;
|
||||
w = dbgAddr.fPhysical? this.bus.getWordDirect(addr) : this.cpu.getWordDirect(addr);
|
||||
if (inc) this.incAddr(dbgAddr, inc);
|
||||
}
|
||||
return w;
|
||||
|
|
@ -635,14 +649,13 @@ if (DEBUGGER) {
|
|||
{
|
||||
var addr = this.getAddr(dbgAddr, true, 1);
|
||||
if (addr !== PDP11.ADDR_INVALID) {
|
||||
this.nDisableMessages++;
|
||||
/*
|
||||
* TODO: We also need a Bus interface to disable fnAccess() calls that could trigger a trap()
|
||||
*/
|
||||
this.bus.setByteDirect(addr, b);
|
||||
this.nDisableMessages--;
|
||||
if (dbgAddr.fPhysical) {
|
||||
this.bus.setByteDirect(addr, b);
|
||||
} else {
|
||||
this.cpu.setByteDirect(addr, b);
|
||||
}
|
||||
if (inc) this.incAddr(dbgAddr, inc);
|
||||
this.cpu.updateCPU(true); // we set fForce to true in case video memory was the target
|
||||
this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -658,29 +671,29 @@ if (DEBUGGER) {
|
|||
{
|
||||
var addr = this.getAddr(dbgAddr, true, 2);
|
||||
if (addr !== PDP11.ADDR_INVALID) {
|
||||
this.nDisableMessages++;
|
||||
/*
|
||||
* TODO: We also need a Bus interface to disable fnAccess() calls that could trigger a trap()
|
||||
*/
|
||||
this.bus.setWordDirect(addr, w);
|
||||
this.nDisableMessages--;
|
||||
if (dbgAddr.fPhysical) {
|
||||
this.bus.setWordDirect(addr, w);
|
||||
} else {
|
||||
this.cpu.setWordDirect(addr, w);
|
||||
}
|
||||
if (inc) this.incAddr(dbgAddr, inc);
|
||||
this.cpu.updateCPU(true); // we set fForce to true in case video memory was the target
|
||||
this.cmp.updateStatus(true); // force a computer status update if, say, video memory was the target
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* newAddr(addr)
|
||||
* newAddr(addr, fPhysical)
|
||||
*
|
||||
* Returns a NEW DbgAddrPDP11 object, initialized with specified values and/or defaults.
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @param {number} [addr]
|
||||
* @param {boolean} [fPhysical]
|
||||
* @return {DbgAddrPDP11}
|
||||
*/
|
||||
DebuggerPDP11.prototype.newAddr = function(addr)
|
||||
DebuggerPDP11.prototype.newAddr = function(addr, fPhysical)
|
||||
{
|
||||
return {addr: addr, fTemporary: false};
|
||||
return {addr: addr, fPhysical: fPhysical, fTemporary: false};
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -750,14 +763,20 @@ if (DEBUGGER) {
|
|||
var dbgAddr;
|
||||
var dbgAddrNext = (fCode? this.dbgAddrNextCode : this.dbgAddrNextData);
|
||||
var addr = dbgAddrNext.addr;
|
||||
var fPhysical = false;
|
||||
if (sAddr !== undefined) {
|
||||
sAddr = this.parseReference(sAddr);
|
||||
var ch = sAddr.charAt(0);
|
||||
if (ch == '%') {
|
||||
fPhysical = true;
|
||||
sAddr = sAddr.substr(1);
|
||||
}
|
||||
dbgAddr = this.findSymbolAddr(sAddr);
|
||||
if (dbgAddr) return dbgAddr;
|
||||
addr = this.parseExpression(sAddr, fPrint);
|
||||
}
|
||||
if (addr != null) {
|
||||
dbgAddr = this.newAddr(addr);
|
||||
dbgAddr = this.newAddr(addr, fPhysical);
|
||||
}
|
||||
return dbgAddr;
|
||||
};
|
||||
|
|
@ -872,7 +891,7 @@ if (DEBUGGER) {
|
|||
if (!cPrev++) this.println("...");
|
||||
} else {
|
||||
typePrev = block.type;
|
||||
var sType = MemoryPDP11.TYPE.NAMES[typePrev];
|
||||
var sType = MemoryPDP11.TYPE_NAMES[typePrev];
|
||||
if (block) {
|
||||
this.println(str.toHex(block.id, 8) + " %" + str.toHex(i << this.bus.nBlockShift, 8) + " %%" + str.toHex(block.addr, 8) + " " + str.toHexWord(block.used) + " " + str.toHexWord(block.size) + " " + sType);
|
||||
}
|
||||
|
|
@ -1027,7 +1046,6 @@ if (DEBUGGER) {
|
|||
this.bitsMessage = this.bitsWarning = MessagesPDP11.WARN;
|
||||
this.sMessagePrev = null;
|
||||
this.aMessageBuffer = [];
|
||||
this.nDisableMessages = 0;
|
||||
/*
|
||||
* Internally, we use "key" instead of "keys", since the latter is a method on JavasScript objects,
|
||||
* but externally, we allow the user to specify "keys"; "kbd" is also allowed as shorthand for "keyboard".
|
||||
|
|
@ -1147,26 +1165,6 @@ if (DEBUGGER) {
|
|||
return s;
|
||||
};
|
||||
|
||||
/**
|
||||
* disableMessages(s)
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
*/
|
||||
DebuggerPDP11.prototype.disableMessages = function()
|
||||
{
|
||||
this.nDisableMessages++;
|
||||
};
|
||||
|
||||
/**
|
||||
* enableMessages(s)
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
*/
|
||||
DebuggerPDP11.prototype.enableMessages = function()
|
||||
{
|
||||
this.nDisableMessages--;
|
||||
};
|
||||
|
||||
/**
|
||||
* message(sMessage, fAddress)
|
||||
*
|
||||
|
|
@ -1176,10 +1174,8 @@ if (DEBUGGER) {
|
|||
*/
|
||||
DebuggerPDP11.prototype.message = function(sMessage, fAddress)
|
||||
{
|
||||
if (this.nDisableMessages) return;
|
||||
|
||||
if (fAddress) {
|
||||
sMessage += " @" + this.toStrAddr(this.newAddr(this.cpu.getPC()));
|
||||
sMessage += " @" + this.toStrAddr(this.newAddr(this.cpu.getLastPC()));
|
||||
}
|
||||
|
||||
if (this.bitsMessage & MessagesPDP11.BUFFER) {
|
||||
|
|
@ -1272,29 +1268,30 @@ if (DEBUGGER) {
|
|||
};
|
||||
|
||||
/**
|
||||
* startCPU(fUpdateFocus)
|
||||
* startCPU(fUpdateFocus, fQuiet)
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @param {boolean} [fUpdateFocus] is true to update focus
|
||||
* @param {boolean} [fQuiet]
|
||||
* @return {boolean} true if run request successful, false if not
|
||||
*/
|
||||
DebuggerPDP11.prototype.startCPU = function(fUpdateFocus)
|
||||
DebuggerPDP11.prototype.startCPU = function(fUpdateFocus, fQuiet)
|
||||
{
|
||||
if (!this.checkCPU()) return false;
|
||||
if (!this.checkCPU(fQuiet)) return false;
|
||||
this.cpu.startCPU(fUpdateFocus);
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* stepCPU(nCycles, fRegs, fUpdateCPU)
|
||||
* stepCPU(nCycles, fRegs, fUpdateStatus)
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @param {number} nCycles (0 for one instruction without checking breakpoints)
|
||||
* @param {boolean} [fRegs] is true to display registers after step (default is false)
|
||||
* @param {boolean} [fUpdateCPU] is false to disable calls to updateCPU() (default is true)
|
||||
* @param {boolean} [fUpdateStatus] is false to disable Computer status updates (default is true)
|
||||
* @return {boolean}
|
||||
*/
|
||||
DebuggerPDP11.prototype.stepCPU = function(nCycles, fRegs, fUpdateCPU)
|
||||
DebuggerPDP11.prototype.stepCPU = function(nCycles, fRegs, fUpdateStatus)
|
||||
{
|
||||
if (!this.checkCPU()) return false;
|
||||
|
||||
|
|
@ -1335,11 +1332,11 @@ if (DEBUGGER) {
|
|||
}
|
||||
|
||||
/*
|
||||
* Because we called cpu.stepCPU() and not cpu.startCPU(), we must nudge the cpu's update code,
|
||||
* and then update our own state. Normally, the only time fUpdateCPU will be false is when doTrace()
|
||||
* is calling us in a loop, in which case it will perform its own updateCPU() when it's done.
|
||||
* Because we called cpu.stepCPU() and not cpu.startCPU(), we must nudge the Computer's update code,
|
||||
* and then update our own state. Normally, the only time fUpdateStatus will be false is when doTrace()
|
||||
* is calling us in a loop, in which case it will perform its own updateStatus() when it's done.
|
||||
*/
|
||||
if (fUpdateCPU !== false) this.cpu.updateCPU();
|
||||
if (fUpdateStatus !== false) this.cmp.updateStatus();
|
||||
|
||||
this.updateStatus(fRegs || false);
|
||||
return (this.nCycles > 0);
|
||||
|
|
@ -1380,23 +1377,20 @@ if (DEBUGGER) {
|
|||
};
|
||||
|
||||
/**
|
||||
* checkCPU()
|
||||
* checkCPU(fQuiet)
|
||||
*
|
||||
* Make sure the CPU is ready (finished initializing), powered, not already running, and not in an error state.
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @param {boolean} [fQuiet]
|
||||
* @return {boolean}
|
||||
*/
|
||||
DebuggerPDP11.prototype.checkCPU = function()
|
||||
DebuggerPDP11.prototype.checkCPU = function(fQuiet)
|
||||
{
|
||||
if (!this.cpu)
|
||||
return false;
|
||||
if (!this.cpu.isReady())
|
||||
return false;
|
||||
if (!this.cpu.isPowered())
|
||||
return false;
|
||||
if (this.cpu.isRunning())
|
||||
if (!this.cpu || !this.cpu.isReady() || !this.cpu.isPowered() || this.cpu.isRunning()) {
|
||||
if (!fQuiet) this.println("cpu busy or unavailable, command ignored");
|
||||
return false;
|
||||
}
|
||||
return !this.cpu.isError();
|
||||
};
|
||||
|
||||
|
|
@ -1625,9 +1619,7 @@ if (DEBUGGER) {
|
|||
*/
|
||||
if (nState >= 0 && this.aaOpcodeCounts.length) {
|
||||
this.cOpcodes++;
|
||||
this.nDisableMessages++;
|
||||
var opCode = this.bus.getWordDirect(addr);
|
||||
this.nDisableMessages--;
|
||||
var opCode = this.cpu.getWordDirect(addr);
|
||||
if (opCode != null) {
|
||||
var dbgAddr = this.aOpcodeHistory[this.iOpcodeHistory];
|
||||
this.setAddr(dbgAddr, cpu.getPC());
|
||||
|
|
@ -1638,6 +1630,38 @@ if (DEBUGGER) {
|
|||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* stopInstruction()
|
||||
*
|
||||
* TODO: Currently, the only way to prevent this call from stopping the CPU is when you're single-stepping.
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @return {boolean} true if stopping is enabled, false if not
|
||||
*/
|
||||
DebuggerPDP11.prototype.stopInstruction = function()
|
||||
{
|
||||
var cpu = this.cpu;
|
||||
if (cpu.isRunning()) {
|
||||
cpu.setPC(this.cpu.getLastPC());
|
||||
this.stopCPU();
|
||||
throw -1; // TODO: Review the appropriate-ness of throwing a bogus vector number in order to immediately stop the instruction
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* undefinedInstruction(opCode)
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @param {number} opCode
|
||||
* @return {boolean} true if stopping is enabled, false if not
|
||||
*/
|
||||
DebuggerPDP11.prototype.undefinedInstruction = function(opCode)
|
||||
{
|
||||
this.printMessage("undefined opcode " + this.toStrBase(opCode), true, true);
|
||||
return this.stopInstruction(); // allow the caller to step over it if they really want a trap generated
|
||||
};
|
||||
|
||||
/**
|
||||
* checkMemoryRead(addr, nb)
|
||||
*
|
||||
|
|
@ -2015,12 +2039,24 @@ if (DEBUGGER) {
|
|||
if (opDesc) break;
|
||||
}
|
||||
|
||||
if (!opDesc) opDesc = [DebuggerPDP11.OPS.NONE];
|
||||
if (!opDesc) {
|
||||
opDesc = DebuggerPDP11.OPNONE;
|
||||
}
|
||||
|
||||
var opNum = opDesc[0];
|
||||
if (this.aOpReserved.indexOf(opNum) >= 0) {
|
||||
opDesc = DebuggerPDP11.OPNONE;
|
||||
opNum = opDesc[0];
|
||||
}
|
||||
|
||||
var sOperands = "", sTarget = "";
|
||||
var sOpName = opNames[opDesc[0]];
|
||||
var sOpName = opNames[opNum];
|
||||
var cOperands = opDesc.length - 1;
|
||||
|
||||
if (!opNum && !cOperands) {
|
||||
sOperands = this.toStrBase(opCode);
|
||||
}
|
||||
|
||||
for (var iOperand = 1; iOperand <= cOperands; iOperand++) {
|
||||
|
||||
var opType = opDesc[iOperand];
|
||||
|
|
@ -2596,7 +2632,7 @@ if (DEBUGGER) {
|
|||
if (asArgs[2] === undefined) {
|
||||
this.println("begin assemble at " + this.toStrAddr(dbgAddr));
|
||||
this.fAssemble = true;
|
||||
this.cpu.updateCPU();
|
||||
this.cmp.updateStatus();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2734,9 +2770,8 @@ if (DEBUGGER) {
|
|||
/**
|
||||
* doDump(asArgs)
|
||||
*
|
||||
* The length parameter is interpreted as a number of bytes, in hex, which we convert to the appropriate number
|
||||
* of lines, because we always display whole lines. If the length is omitted/undefined, it defaults to 0x80 (128.)
|
||||
* bytes, which normally translates to 8 lines.
|
||||
* The length parameter is interpreted as a number of bytes (or words, or dwords) to dump, and it is
|
||||
* interpreted using the current base.
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @param {Array.<string>} asArgs (formerly sCmd, [sAddr], [sLen] and [sBytes])
|
||||
|
|
@ -2833,28 +2868,31 @@ if (DEBUGGER) {
|
|||
|
||||
var sDump = "";
|
||||
var size = (sCmd == "dd"? 4 : (sCmd == "dw"? 2 : 1));
|
||||
var cb = (size * len) || 128;
|
||||
var cLines = ((cb + 15) >> 4) || 1;
|
||||
var nBytes = (size * len) || 128;
|
||||
var nLines = ((nBytes + 15) >> 4) || 1;
|
||||
|
||||
while (cLines-- && cb > 0) {
|
||||
var data = 0, iByte = 0, i;
|
||||
while (nLines-- && nBytes > 0) {
|
||||
var data = 0, shift = 0, i;
|
||||
var sData = "", sChars = "";
|
||||
sAddr = this.toStrAddr(dbgAddr);
|
||||
/*
|
||||
* It's just coincidence that we want to dump 8 bytes per line when using base 8 and 16 bytes
|
||||
* per line when using base 16, because octal requires more digits.
|
||||
* Dump 8 bytes per line when using base 8, and dump 16 bytes when using base 16 (or when dumping dwords).
|
||||
*
|
||||
* And while we used to always call getByte() and assemble them into words or dwords as appropriate, I've
|
||||
* changed the logic below to honor "dw" by calling getWord(), since the Bus interfaces have been updated
|
||||
* to prevent generating traps due to to Debugger access of unaligned memory and/or undefined IOPAGE addresses.
|
||||
*/
|
||||
var nBytes = (size == 4? 16 : this.nBase);
|
||||
for (i = nBytes; i > 0 && cb > 0; i--) {
|
||||
var b = this.getByte(dbgAddr, 1);
|
||||
data |= (b << (iByte++ << 3));
|
||||
if (iByte == size) {
|
||||
sData += (this.nBase == 8? str.toOct(data, size * 3) : str.toHex(data, size * 2));
|
||||
for (i = (size == 4? 16 : this.nBase); i > 0 && nBytes > 0; i--) {
|
||||
var n, v = size == 2? this.getWord(dbgAddr, n = 2) : this.getByte(dbgAddr, n = 1);
|
||||
data |= (v << (shift << 3));
|
||||
shift += n;
|
||||
if (shift == size) {
|
||||
sData += this.toStrBase(data, size);
|
||||
sData += (size == 1? (i == 9? '-' : ' ') : " ");
|
||||
data = iByte = 0;
|
||||
data = shift = 0;
|
||||
}
|
||||
sChars += (b >= 32 && b < 128? String.fromCharCode(b) : '.');
|
||||
cb--;
|
||||
sChars += (v >= 32 && v < 128? String.fromCharCode(v) : '.');
|
||||
nBytes--;
|
||||
}
|
||||
if (sDump) sDump += '\n';
|
||||
sDump += sAddr + " " + sData + ((i == 0)? (' ' + sChars) : "");
|
||||
|
|
@ -3291,7 +3329,7 @@ if (DEBUGGER) {
|
|||
this.println("unknown register: " + sReg);
|
||||
return;
|
||||
}
|
||||
cpu.updateCPU();
|
||||
this.cmp.updateStatus();
|
||||
this.println("updated registers:");
|
||||
}
|
||||
|
||||
|
|
@ -3323,9 +3361,7 @@ if (DEBUGGER) {
|
|||
this.parseAddrOptions(dbgAddr, sOptions);
|
||||
this.setTempBreakpoint(dbgAddr);
|
||||
}
|
||||
if (!this.startCPU(true)) {
|
||||
if (!fQuiet) this.println("cpu busy or unavailable, run command ignored");
|
||||
}
|
||||
this.startCPU(true, fQuiet);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -3537,54 +3573,61 @@ if (DEBUGGER) {
|
|||
},
|
||||
function onCountStepComplete() {
|
||||
/*
|
||||
* We explicitly called stepCPU() with fUpdateCPU === false, because repeatedly
|
||||
* calling updateCPU() can be very slow, especially when fDisplayLiveRegs is true,
|
||||
* so once the repeat count has been exhausted, we must perform a final updateCPU().
|
||||
* We explicitly called stepCPU() with fUpdateStatus === false, because repeatedly
|
||||
* calling updateStatus() can be very slow, especially if a Control Panel is present
|
||||
* with displayLiveRegs enabled, so once the repeat count has been exhausted, we must
|
||||
* perform a final updateStatus().
|
||||
*/
|
||||
dbg.cpu.updateCPU();
|
||||
dbg.cmp.updateStatus();
|
||||
dbg.setBusy(false);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* doUnassemble(sAddr, sAddrEnd, n)
|
||||
* doUnassemble(sAddr, sAddrEnd, nLines)
|
||||
*
|
||||
* @this {DebuggerPDP11}
|
||||
* @param {string} [sAddr]
|
||||
* @param {string} [sAddrEnd]
|
||||
* @param {number} [n]
|
||||
* @param {number} [nLines]
|
||||
*/
|
||||
DebuggerPDP11.prototype.doUnassemble = function(sAddr, sAddrEnd, n)
|
||||
DebuggerPDP11.prototype.doUnassemble = function(sAddr, sAddrEnd, nLines)
|
||||
{
|
||||
var dbgAddr = this.parseAddr(sAddr, true);
|
||||
if (!dbgAddr) return;
|
||||
|
||||
if (n === undefined) n = 1;
|
||||
if (nLines === undefined) nLines = 1;
|
||||
|
||||
var cb = 0x100;
|
||||
var nBytes = 0x100;
|
||||
if (sAddrEnd !== undefined) {
|
||||
|
||||
var dbgAddrEnd = this.parseAddr(sAddrEnd, true);
|
||||
if (!dbgAddrEnd || dbgAddrEnd.addr < dbgAddr.addr) return;
|
||||
|
||||
cb = dbgAddrEnd.addr - dbgAddr.addr;
|
||||
if (!DEBUG && cb > 0x100) {
|
||||
/*
|
||||
* Limiting the amount of disassembled code to 256 bytes in non-DEBUG builds is partly to
|
||||
* prevent the user from wedging the browser by dumping too many lines, but also a recognition
|
||||
* that, in non-DEBUG builds, this.println() keeps print output buffer truncated to 8Kb anyway.
|
||||
*/
|
||||
this.println("range too large");
|
||||
return;
|
||||
if (sAddrEnd.charAt(0) == 'l') {
|
||||
var n = this.parseValue(sAddrEnd.substr(1));
|
||||
if (n != null) nLines = n;
|
||||
}
|
||||
else {
|
||||
var dbgAddrEnd = this.parseAddr(sAddrEnd, true);
|
||||
if (!dbgAddrEnd || dbgAddrEnd.addr < dbgAddr.addr) return;
|
||||
|
||||
nBytes = dbgAddrEnd.addr - dbgAddr.addr;
|
||||
if (!DEBUG && nBytes > 0x100) {
|
||||
/*
|
||||
* Limiting the amount of disassembled code to 256 bytes in non-DEBUG builds is partly to
|
||||
* prevent the user from wedging the browser by dumping too many lines, but also a recognition
|
||||
* that, in non-DEBUG builds, this.println() keeps print output buffer truncated to 8Kb anyway.
|
||||
*/
|
||||
this.println("range too large");
|
||||
return;
|
||||
}
|
||||
nLines = -1;
|
||||
}
|
||||
n = -1;
|
||||
}
|
||||
|
||||
var cLines = 0;
|
||||
var nPrinted = 0;
|
||||
var sInstruction;
|
||||
|
||||
while (cb > 0 && n--) {
|
||||
while (nBytes > 0 && nLines--) {
|
||||
|
||||
var nSequence = (this.isBusy(false) || this.nStep)? this.nCycles : null;
|
||||
var sComment = (nSequence != null? "cycles" : null);
|
||||
|
|
@ -3592,8 +3635,8 @@ if (DEBUGGER) {
|
|||
|
||||
var addr = dbgAddr.addr; // we snap dbgAddr.addr *after* calling findSymbol(), which re-evaluates it
|
||||
|
||||
if (aSymbol[0] && n) {
|
||||
if (!cLines && n || aSymbol[0].indexOf('+') < 0) {
|
||||
if (aSymbol[0] && nLines) {
|
||||
if (!nPrinted && nLines || aSymbol[0].indexOf('+') < 0) {
|
||||
var sLabel = aSymbol[0] + ':';
|
||||
if (aSymbol[2]) sLabel += ' ' + aSymbol[2];
|
||||
this.println(sLabel);
|
||||
|
|
@ -3609,8 +3652,8 @@ if (DEBUGGER) {
|
|||
|
||||
this.println(sInstruction);
|
||||
this.dbgAddrNextCode = dbgAddr;
|
||||
cb -= dbgAddr.addr - addr;
|
||||
cLines++;
|
||||
nBytes -= dbgAddr.addr - addr;
|
||||
nPrinted++;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
/**
|
||||
* @fileoverview PDP11-specific compile-time definitions.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Sep-03
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
||||
* may be used freely provided the original author name is acknowledged in any modified source code.
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of September 2016 at <http://skn.noip.me/pdp11/pdp11.html>. This code
|
||||
* may be used freely provided the original authors are acknowledged in any modified source code.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -21,9 +20,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -79,6 +78,29 @@ var BYTEARRAYS = false;
|
|||
*/
|
||||
var TYPEDARRAYS = (typeof ArrayBuffer !== 'undefined');
|
||||
|
||||
/**
|
||||
* MEMFAULT forces the Memory interfaces to signal a CPU fault when a word is accessed using an odd (unaligned) address.
|
||||
*
|
||||
* Since PDPjs inherited its Bus component from PCx86, it included support for both aligned and unaligned word accesses
|
||||
* by default. However, the PDP-11 adds a wrinkle: when an odd address is used to access a memory word, a BUS_ERROR trap
|
||||
* must be generated. Note that odd IOPAGE word accesses are fine; this only affects the Memory component.
|
||||
*
|
||||
* When the MMU is enabled, these checks may also be performed at a higher level, eliminating the need for them at the
|
||||
* physical memory level.
|
||||
*/
|
||||
var MEMFAULT = true;
|
||||
|
||||
/**
|
||||
* WORDBUS turns off support for unaligned memory words. Whereas MEMFAULT necessarily slows down memory word accesses
|
||||
* slightly, WORDBUS is able to speed them up slightly, by assuming that all word accesses (which didn't fault) must be
|
||||
* aligned. This affects all word accesses, even IOPAGE accesses, because it also eliminates cross-block boundary checks.
|
||||
*
|
||||
* Don't worry that the source code looks MORE complicated rather than LESS with the additional MEMFAULT and WORDBUS checks,
|
||||
* because the Closure Compiler eliminates those checks and throws away the (unreachable) code blocks that deal with unaligned
|
||||
* accesses.
|
||||
*/
|
||||
var WORDBUS = true;
|
||||
|
||||
/*
|
||||
* Combine all the shared globals and machine-specific globals into one machine-specific global object,
|
||||
* which all machine components should start using; eg: "if (PDP11.DEBUG) ..." instead of "if (DEBUG) ...".
|
||||
|
|
@ -95,12 +117,15 @@ var PDP11 = {
|
|||
MAXDEBUG: MAXDEBUG, // shared
|
||||
PRIVATE: PRIVATE, // shared
|
||||
TYPEDARRAYS:TYPEDARRAYS,
|
||||
MEMFAULT: MEMFAULT,
|
||||
WORDBUS: WORDBUS,
|
||||
SITEHOST: SITEHOST, // shared
|
||||
XMLVERSION: XMLVERSION, // shared
|
||||
|
||||
/*
|
||||
* CPU model numbers (supported)
|
||||
*/
|
||||
MODEL_1120: 1120,
|
||||
MODEL_1145: 1145,
|
||||
MODEL_1170: 1170,
|
||||
|
||||
|
|
@ -143,7 +168,10 @@ var PDP11 = {
|
|||
TF: 0x0010, // bit 4: Trap Flag
|
||||
PRI: 0x00E0, // bits 5-7: Priority
|
||||
UNUSED: 0x0700, // bits 8-10: unused
|
||||
REGSET: 0x0800, // bit 11: Register Set
|
||||
/*
|
||||
* PSW bits above this point are unused on 11/20-class machines
|
||||
*/
|
||||
REGSET: 0x0800, // bit 11: Register Set (
|
||||
PMODE: 0x3000, // bits 12-13: Prev Mode (see PDP11.MODE)
|
||||
CMODE: 0xC000, // bits 14-15: Curr Mode (see PDP11.MODE)
|
||||
SHIFT: {
|
||||
|
|
@ -162,7 +190,7 @@ var PDP11 = {
|
|||
*/
|
||||
OPFLAG: {
|
||||
INTQ_SPL: 0x01, // INTQ triggered by SPL
|
||||
INTQ: 0x02, // call checkInterruptQueue()
|
||||
INTQ: 0x02, // call checkInterrupts()
|
||||
WAIT: 0x04, // WAIT operation in progress
|
||||
TRAP_TF: 0x10, // aka PDP11.PSW.TF
|
||||
TRAP_MMU: 0x20,
|
||||
|
|
@ -397,11 +425,15 @@ var PDP11 = {
|
|||
|
||||
LKS: 0o177546, // KW11-L Clock Status
|
||||
|
||||
RCSR: 0o177560, // Console Terminal: Receiver Status Register
|
||||
RBUF: 0o177562, // Console Terminal: Receiver Data Buffer Register
|
||||
XCSR: 0o177564, // Console Terminal: Transmitter Status Register
|
||||
XBUF: 0o177566, // Console Terminal: Transmitter Data Buffer Register
|
||||
DISPLAY: 0o177570, // Console Switch and Display
|
||||
PRS: 0o177550, // PC11/PR11 Reader Status Register
|
||||
PRB: 0o177552, // PC11/PR11 Reader Buffer Register
|
||||
|
||||
RCSR: 0o177560, // Display Terminal: Receiver Status Register
|
||||
RBUF: 0o177562, // Display Terminal: Receiver Data Buffer Register
|
||||
XCSR: 0o177564, // Display Terminal: Transmitter Status Register
|
||||
XBUF: 0o177566, // Display Terminal: Transmitter Data Buffer Register
|
||||
|
||||
CNSL: 0o177570, // Console Switch and Front Panel Display
|
||||
|
||||
MMR0: 0o177572, // 777572 17777572
|
||||
MMR1: 0o177574, // 777574 17777574
|
||||
|
|
@ -440,20 +472,62 @@ var PDP11 = {
|
|||
UDSAR6: 0o177674, // User D Space Address Register 6
|
||||
UDSAR7: 0o177676, // User D Space Address Register 7
|
||||
|
||||
SIZE_LO: 0o177760, // Lower Size Register (last 32-word block) (11/70 only?)
|
||||
SIZE_HI: 0o177762, // Upper Size Register (always zero) (11/70 only?)
|
||||
SYSID: 0o177764, // System ID Register (11/70 only?)
|
||||
CPUERR: 0o177766, // CPU error (11/70 only?)
|
||||
MB: 0o177770, // Microprogram break (11/70 only?)
|
||||
R0SET0: 0o177700,
|
||||
R1SET0: 0o177701,
|
||||
R2SET0: 0o177702,
|
||||
R3SET0: 0o177703,
|
||||
R4SET0: 0o177704,
|
||||
R5SET0: 0o177705,
|
||||
R6KERNEL: 0o177706,
|
||||
R7KERNEL: 0o177707,
|
||||
R0SET1: 0o177710,
|
||||
R1SET1: 0o177711,
|
||||
R2SET1: 0o177712,
|
||||
R3SET1: 0o177713,
|
||||
R4SET1: 0o177714,
|
||||
R5SET1: 0o177715,
|
||||
R6SUPER: 0o177716,
|
||||
R6USER: 0o177717,
|
||||
|
||||
/*
|
||||
* This next group of registers is largely ignored; all accesses are routed to regsControl[]
|
||||
*/
|
||||
LAERR: 0o177740, // Low Address Error (11/70 only)
|
||||
HAERR: 0o177742, // High Address Error (11/70 only)
|
||||
MEMERR: 0o177744, // Memory System Error (11/70 only)
|
||||
CACHEC: 0o177746, // Cache Control (11/70 only)
|
||||
MAINT: 0o177750, // Maintenance (11/70 only)
|
||||
HITMISS: 0o177752, // Hit/Miss (11/70 only)
|
||||
UNDEF1: 0o177754,
|
||||
UNDEF2: 0o177756,
|
||||
|
||||
LSIZE: 0o177760, // Lower Size Register (last 32-word block) (11/70 only)
|
||||
HSIZE: 0o177762, // Upper Size Register (always zero) (11/70 only)
|
||||
SYSID: 0o177764, // System ID Register (11/70 only)
|
||||
CPUERR: 0o177766, // CPU error (11/70 only)
|
||||
MB: 0o177770, // Microprogram break (11/70 only)
|
||||
PIR: 0o177772, // Program Interrupt Request
|
||||
SL: 0o177774, // Stack Limit Register
|
||||
PSW: 0o177776 // 777776 17777776 0x3FFFFE Processor Status Word
|
||||
},
|
||||
PC11: { // High Speed Reader & Punch (PR11 is a Reader-only unit)
|
||||
PRS: {
|
||||
RE: 0x0001, // Reader Enable (W/O)
|
||||
RIE: 0x0040, // Reader Interrupt Enable (allows the DONE and ERROR bits to trigger an interrupt)
|
||||
DONE: 0x0080, // Done (R/O)
|
||||
BUSY: 0x0800, // Busy (R/O)
|
||||
ERROR: 0x8000, // Error (R/O)
|
||||
CLEAR: 0x08C0, // bits cleared on INIT
|
||||
WMASK: 0x0041 // bits writable
|
||||
},
|
||||
PRB: {
|
||||
MASK: 0x00FF // Data
|
||||
}
|
||||
},
|
||||
DL11: { // Serial Line Interface (program compatible with the KL11 for control of console teleprinters)
|
||||
PRI: 4,
|
||||
RVEC: 0o60,
|
||||
XVEC: 0o64,
|
||||
DELAY: 40,
|
||||
RCSR: { // 177560
|
||||
RE: 0x0001, // Reader Enable (W/O) TODO: Determine if we really need to exclude this write-only bit from RMASK
|
||||
DTR: 0x0002, // Data Terminal Ready (R/W)
|
||||
|
|
@ -476,7 +550,8 @@ var PDP11 = {
|
|||
PARITY: 0x1000, // Received Data Parity (R/O)
|
||||
FE: 0x2000, // Framing Error (R/O)
|
||||
OE: 0x4000, // Overrun Error (R/O)
|
||||
ERROR: 0x8000 // Error (R/O)
|
||||
ERROR: 0x8000, // Error (R/O)
|
||||
DELAY: 1
|
||||
},
|
||||
XCSR: { // 177564
|
||||
BREAK: 0x0001, // BREAK (R/W)
|
||||
|
|
@ -485,11 +560,11 @@ var PDP11 = {
|
|||
READY: 0x0080, // Transmitter Ready (R/O)
|
||||
RMASK: 0x00C5,
|
||||
WMASK: 0x0045,
|
||||
DELAY: 8
|
||||
DELAY: 1
|
||||
},
|
||||
XBUF: { // 177566
|
||||
DATA: 0x00FF, // Transmitted Data (W/O) TODO: Determine why pdp11.js effectively defined this as 0x7F
|
||||
DELAY: 100
|
||||
DELAY: 1
|
||||
}
|
||||
},
|
||||
KW11: { // KW11-L Line Time Clock
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,14 +1,13 @@
|
|||
/**
|
||||
* @fileoverview Implements the PDP11 Keyboard component.
|
||||
* @author <a href="mailto:Jeff@pcjs.org">Jeff Parsons</a>
|
||||
* @version 1.0
|
||||
* Created 2016-Sep-03
|
||||
* @copyright © Jeff Parsons 2012-2016
|
||||
*
|
||||
* This file is part of PCjs, a computer emulation software project at <http://pcjs.org/>.
|
||||
*
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.3 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of August 2016 from http://skn.noip.me/pdp11/pdp11.html. This code
|
||||
* may be used freely provided the original author name is acknowledged in any modified source code.
|
||||
* It has been adapted from the JavaScript PDP 11/70 Emulator v1.4 written by Paul Nankervis
|
||||
* (paulnank@hotmail.com) as of September 2016 at <http://skn.noip.me/pdp11/pdp11.html>. This code
|
||||
* may be used freely provided the original authors are acknowledged in any modified source code.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -21,9 +20,9 @@
|
|||
* 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 COPYRIGHT in /modules/shared/lib/defines.js).
|
||||
* You are required to include the above copyright notice in every modified copy of this work
|
||||
* and to display that copyright notice when the software starts running; see COPYRIGHT in
|
||||
* <http://pcjs.org/modules/shared/lib/defines.js>.
|
||||
*
|
||||
* 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 PCjs
|
||||
|
|
@ -61,16 +60,16 @@ Component.subclass(KeyboardPDP11);
|
|||
KeyboardPDP11.MINPRESSTIME = 100; // 100ms
|
||||
|
||||
/**
|
||||
* setBinding(sHTMLType, sBinding, control, sValue)
|
||||
* setBinding(sType, sBinding, control, sValue)
|
||||
*
|
||||
* @this {KeyboardPDP11}
|
||||
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas")
|
||||
* @param {string|null} sType is the type of the HTML control (eg, "button", "textarea", "register", "flag", "rled", etc)
|
||||
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "esc")
|
||||
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
|
||||
* @param {string} [sValue] optional data value
|
||||
* @return {boolean} true if binding was successful, false if unrecognized binding request
|
||||
*/
|
||||
KeyboardPDP11.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
|
||||
KeyboardPDP11.prototype.setBinding = function(sType, sBinding, control, sValue)
|
||||
{
|
||||
return false;
|
||||
};
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue