pcjs/my_modules/pcjs-client/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2014-11-07 15:04:25 -08:00
..
.jshintrc Implemented 80286 LOADALL 2014-11-01 17:12:20 -07:00
bus.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
chipset.js Debugger improvements for DOS debugging 2014-11-07 15:04:25 -08:00
computer.js Starting work on 1.15.9: keyboard cleanup in progress 2014-11-05 15:01:24 -08:00
cpu.js Fixed command-line interface 2014-11-02 01:22:39 -07:00
debugger.js Debugger improvements for DOS debugging 2014-11-07 15:04:25 -08:00
defines.js Fixed internal stack overflow caused by overly rapid keyboard interrupts 2014-11-06 15:31:50 -08:00
disk.js Collapsed /configs into /devices (or in some cases, /apps or /disks), simplifying the structure a bit 2014-11-03 00:11:41 -08:00
fdc.js Added a few more interesting Compaq disk images 2014-11-03 18:13:38 -08:00
hdc.js Fixed command-line interface 2014-11-02 01:22:39 -07:00
keyboard.js Improved handling of multi-scancode sequences 2014-11-07 12:10:47 -08:00
mem.js Fixed internal stack overflow caused by overly rapid keyboard interrupts 2014-11-06 15:31:50 -08:00
mouse.js Fixed command-line interface 2014-11-02 01:22:39 -07:00
nodebugger.js Implemented 80286 LOADALL 2014-11-01 17:12:20 -07:00
panel.js Starting work on 1.15.9: keyboard cleanup in progress 2014-11-05 15:01:24 -08:00
ram.js Starting work on 1.15.9: keyboard cleanup in progress 2014-11-05 15:01:24 -08: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 Starting work on 1.15.9: keyboard cleanup in progress 2014-11-05 15:01:24 -08:00
state.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
video.js Fixed CAPSLOCK handling and tidied up some more things in keyboard.js 2014-11-07 09:59:04 -08:00
x86.js Implemented 80286 LOADALL 2014-11-01 17:12:20 -07:00
x86cpu.js Debugger improvements for DOS debugging 2014-11-07 15:04:25 -08:00
x86grps.js Implemented 80286 LOADALL 2014-11-01 17:12:20 -07:00
x86help.js Implemented 80286 LOADALL 2014-11-01 17:12:20 -07:00
x86mods.js Removed all obsolete @suppress directives 2014-10-30 16:36:23 -07:00
x86op0f.js Implemented 80286 LOADALL 2014-11-01 17:12:20 -07:00
x86opxx.js Implemented 80286 LOADALL 2014-11-01 17:12:20 -07:00
x86seg.js Fixed command-line interface 2014-11-02 01:22:39 -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.