pcjs/my_modules/pcjs-client/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2014-10-02 10:48:41 -07:00
..
bus.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
chipset.js Fix an inconsistency in Debugger address parsing (problems mixing segment and physical addresses) 2014-10-02 10:48:41 -07:00
computer.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
cpu.js Updated the 5170 BIOS map, updated 8042 info, fixed some 8042 controller commands, made HLT work, and fixed the debugger's history buffer when executing a mix of real-mode and protected-mode instructions 2014-10-01 17:33:17 -07:00
debugger.js Fix an inconsistency in Debugger address parsing (problems mixing segment and physical addresses) 2014-10-02 10:48:41 -07:00
defines.js README updates (and some code inspection fixes) 2014-09-28 18:18:53 -07:00
disk.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
fdc.js Fixed 5170 memory test and debugger addressing issues 2014-10-02 01:49:03 -07:00
hdc.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
keyboard.js Fix an inconsistency in Debugger address parsing (problems mixing segment and physical addresses) 2014-10-02 10:48:41 -07:00
mem.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
mouse.js README updates (and some code inspection fixes) 2014-09-28 18:18:53 -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 Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
ram.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
README.md README updates (and some code inspection fixes) 2014-09-28 18:18:53 -07:00
rom.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
serial.js README updates (and some code inspection fixes) 2014-09-28 18:18:53 -07:00
state.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
video.js README updates (and some code inspection fixes) 2014-09-28 18:18:53 -07:00
x86.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
x86cpu.js Fixed 5170 memory test and debugger addressing issues 2014-10-02 01:49:03 -07:00
x86grps.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
x86help.js README updates (and some code inspection fixes) 2014-09-28 18:18:53 -07:00
x86mods.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
x86op0f.js Initial commit (a clone of the jsmachines project as of v1.15.3) 2014-09-27 14:52:57 -07:00
x86opxx.js Updated the 5170 BIOS map, updated 8042 info, fixed some 8042 controller commands, made HLT work, and fixed the debugger's history buffer when executing a mix of real-mode and protected-mode instructions 2014-10-01 17:33:17 -07:00
x86seg.js Fixed 5170 memory test and debugger addressing issues 2014-10-02 01:49:03 -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.