pcjs/my_modules/pcjs-client/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jeff Parsons 905a30017e Some minor Debugger tweaks and other improvements
If a Markdown document contains an embedded machine that specifies a version number (eg, "1.15.6"), then the web server will switch to serving a compiled version, since that's the only way it can guarantee the requested version
2014-10-31 17:44:34 -07:00
..
.jshintrc "Fake" XDF disk support works now 2014-10-27 22:20:41 -07:00
bus.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
chipset.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
computer.js Some minor Debugger tweaks and other improvements 2014-10-31 17:44:34 -07:00
cpu.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
debugger.js Some minor Debugger tweaks and other improvements 2014-10-31 17:44:34 -07:00
defines.js Disable TypedArray support for now (still slower than the default Memory implementation) 2014-10-12 13:41:37 -07:00
disk.js Some minor Debugger tweaks and other improvements 2014-10-31 17:44:34 -07:00
fdc.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
hdc.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
keyboard.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
mem.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
mouse.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
nodebugger.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
panel.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
ram.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
README.md README updates (and some code inspection fixes) 2014-09-28 18:18:53 -07:00
rom.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
serial.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
state.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
video.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
x86.js Implemented (but have not yet tested) 286 LOADALL 2014-10-31 13:40:19 -07:00
x86cpu.js Implemented (but have not yet tested) 286 LOADALL 2014-10-31 13:40:19 -07:00
x86grps.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
x86help.js Implemented (but have not yet tested) 286 LOADALL 2014-10-31 13:40:19 -07:00
x86mods.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
x86op0f.js setPS() shouldn't be called until *after* nCPL has been updated 2014-10-31 13:47:11 -07:00
x86opxx.js Implemented (but have not yet tested) 286 LOADALL 2014-10-31 13:40:19 -07:00
x86seg.js Implemented (but have not yet tested) 286 LOADALL 2014-10-31 13:40:19 -07:00

PCjs Sources

Structure

All the code for PCjs is contained in the following JavaScript files, which roughly divide the functionality into major PC components, aka "devices". However, not every file implements a device, and "component" is an overloaded term, since Component is also the name of the shared base class used for most PCjs devices (see component.js). So it's best to refer to these files generically as "modules", and more specifically as "device modules" whenever they implement a specific device (or set of devices, in the case of Chipset).

Examples of non-device modules include UI modules like panel.js and debugger.js, and sub-modules like x86opxx.js, x86mods.js and x86help.js that separate the CPU functionality of x86.js into more manageable pieces.

These modules should always be loaded or compiled in the order listed by the pcJSFiles property in package.json, which includes all the necessary shared modules as well. At the time of this writing, the order is:

Some of the modules can be reordered or even omitted (eg, debugger.js or embed.js), but you should observe the following:

  • component.js must be listed before any module that extends Component
  • panel.js should be loaded early to initialize the Control Panel (if any) as soon as possible
  • computer.js should be the last device module, as it supervises and notifies all the other device modules

To minimize ordering requirements, the init() handlers and constructors of all modules should avoid referencing other modules. Device modules should define an initBus() notification handler, which the Computer will call after it has created/initialized the Bus object.