Updated comments

This commit is contained in:
Jeff Parsons 2014-12-13 11:20:22 -08:00 committed by jeffpar
commit a1f0f6b279
23 changed files with 105 additions and 142 deletions

View file

@ -248,14 +248,12 @@ C1PComputer.power = function(computer)
};
/*
* C1PComputer.init()
* C1PComputer.init()
*
* This function operates on every element (e) of class "computer", and initializes
* all the necessary HTML to construct the C1PComputer(s) as spec'ed.
*
* Note that each element (e) of class "computer" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the C1PComputer constructor
* expects.
* This function operates on every HTML element of class "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.
*/
C1PComputer.init = function()
{

View file

@ -3862,14 +3862,12 @@ C1PCPU.prototype.opUndefined = function()
};
/**
* C1PCPU.init()
* C1PCPU.init()
*
* This function operates on every element (e) of class "cpu", and initializes
* all the necessary HTML to construct the CPU module(s) as spec'ed.
*
* Note that each element (e) of class "cpu" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the CPU constructor
* expects.
* This function operates on every HTML element of class "cpu", extracting the
* JSON-encoded parameters for the C1PCPU constructor from the element's "data-value"
* attribute, invoking the constructor to create a C1PCPU component, and then binding
* any associated HTML controls to the new component.
*/
C1PCPU.init = function()
{

View file

@ -2185,12 +2185,10 @@ if (DEBUGGER) {
/**
* C1PDebugger.init()
*
* This function operates on every element (e) of class "debugger", and initializes
* all the necessary HTML to construct the Debugger module(s) as spec'ed.
*
* Note that each element (e) of class "debugger" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Debugger constructor
* expects.
* This function operates on every HTML element of class "debugger", extracting the
* JSON-encoded parameters for the C1PDebugger constructor from the element's "data-value"
* attribute, invoking the constructor to create a C1PDebugger component, and then binding
* any associated HTML controls to the new component.
*/
C1PDebugger.init = function()
{

View file

@ -1240,12 +1240,10 @@ C1PDiskController.prototype.writePort = function(port, reg)
/**
* C1PDiskController.init()
*
* This function operates on every element (e) of class "disk", and initializes
* all the necessary HTML to construct the DiskController module(s) as spec'ed.
*
* Note that each element (e) of class "disk" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the DiskController
* constructor expects.
* This function operates on every HTML element of class "disk", extracting the
* JSON-encoded parameters for the C1PDiskController constructor from the element's "data-value"
* attribute, invoking the constructor to create a C1PDiskController component, and then binding
* any associated HTML controls to the new component.
*/
C1PDiskController.init = function()
{

View file

@ -1079,12 +1079,10 @@ C1PKeyboard.prototype.updateMemory = function(fPropagate, addr, bWrite)
/**
* C1PKeyboard.init()
*
* This function operates on every element (e) of class "keyboard", and initializes
* all the necessary HTML to construct the Keyboard module(s) as spec'ed.
*
* Note that each element (e) of class "keyboard" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Keyboard constructor
* expects.
* This function operates on every HTML element of class "keyboard", extracting the
* JSON-encoded parameters for the C1PKeyboard constructor from the element's "data-value"
* attribute, invoking the constructor to create a C1PKeyboard component, and then binding
* any associated HTML controls to the new component.
*/
C1PKeyboard.init = function()
{

View file

@ -89,21 +89,19 @@ C1PPanel.prototype.setPower = function(fOn, cmp)
/**
* C1PPanel.init()
*
* This function operates on every element (e) of class "panel", and initializes
* all the necessary HTML to construct the Panel module(s) as spec'ed.
*
* Note that each element (e) of class "panel" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Panel constructor
* expects.
* This function operates on every HTML element of class "panel", extracting the
* JSON-encoded parameters for the C1PPanel constructor from the element's "data-value"
* attribute, invoking the constructor to create a C1PPanel component, and then binding
* any associated HTML controls to the new component.
*
* NOTE: Unlike most other component init() functions, this one is designed to be
* called multiple times: once at load time, so that we can binding our print()
* function to the panel's output control ASAP, and again when the Computer component
* function to the panel's output control ASAP, and again when the C1PComputer component
* is verifying that all components are ready and invoking their setPower() functions.
*
* Our setPower() method gives us a second opportunity to notify any components that
* that might care (eg, CPU, Keyboard, and Debugger) that we have some controls they
* might want to use.
* that might care (eg, C1PCPU, C1PKeyboard, and C1PDebugger) that we have some controls
* they might want to use.
*/
C1PPanel.init = function()
{

View file

@ -71,12 +71,10 @@ C1PRAM.prototype.setBuffer = function(abMemory, start, end, cpu)
/**
* C1PRAM.init()
*
* This function operates on every element (e) of class "ram", and initializes
* all the necessary HTML to construct the RAM module(s) as spec'ed.
*
* Note that each element (e) of class "ram" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the RAM constructor
* expects.
* This function operates on every HTML element of class "ram", extracting the
* JSON-encoded parameters for the C1PRAM constructor from the element's "data-value"
* attribute, invoking the constructor to create a C1PRAM component, and then binding
* any associated HTML controls to the new component.
*/
C1PRAM.init = function()
{

View file

@ -214,12 +214,10 @@ C1PROM.prototype.copyImage = function()
/**
* C1PROM.init()
*
* This function operates on every element (e) of class "rom", and initializes
* all the necessary HTML to construct the ROM module(s) as spec'ed.
*
* Note that each element (e) of class "rom" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the ROM constructor
* expects.
* This function operates on every HTML element of class "rom", extracting the
* JSON-encoded parameters for the C1PROM constructor from the element's "data-value"
* attribute, invoking the constructor to create a C1PROM component, and then binding
* any associated HTML controls to the new component.
*/
C1PROM.init = function()
{

View file

@ -377,12 +377,10 @@ C1PSerialPort.prototype.updateMemory = function()
/**
* C1PSerialPort.init()
*
* This function operates on every element (e) of class "serial", and initializes
* all the necessary HTML to construct the SerialPort module(s) as spec'ed.
*
* Note that each element (e) of class "serial" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the SerialPort constructor
* expects.
* This function operates on every HTML element of class "serial", extracting the
* JSON-encoded parameters for the C1PSerialPort constructor from the element's "data-value"
* attribute, invoking the constructor to create a C1PSerialPort component, and then binding
* any associated HTML controls to the new component.
*/
C1PSerialPort.init = function()
{

View file

@ -512,12 +512,10 @@ C1PVideo.prototype.updateWindow = function(col, row, b)
/**
* C1PVideo.init()
*
* This function operates on every element (e) of class "video", and initializes
* all the necessary HTML to construct every Video module as spec'ed.
*
* Note that each element (e) of class "video" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Video constructor
* expects.
* This function operates on every HTML element of class "video", extracting the
* JSON-encoded parameters for the C1PVideo constructor from the element's "data-value"
* attribute, invoking the constructor to create a C1PVideo component, and then binding
* any associated HTML controls to the new component.
*/
C1PVideo.init = function()
{

View file

@ -4996,14 +4996,12 @@ ChipSet.aPortOutput5170 = {
};
/**
* ChipSet.init()
* ChipSet.init()
*
* This function operates on every element (e) of class "chipset", and initializes
* all the necessary HTML to construct the ChipSet module(s) as spec'ed.
*
* Note that each element (e) of class "chipset" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the ChipSet constructor
* expects.
* This function operates on every HTML element of class "chipset", extracting the
* JSON-encoded parameters for the ChipSet constructor from the element's "data-value"
* attribute, invoking the constructor to create a ChipSet component, and then binding
* any associated HTML controls to the new component.
*/
ChipSet.init = function()
{

View file

@ -1189,12 +1189,10 @@ Computer.prototype.getComponentByType = function(sType, componentPrev)
/**
* Computer.init()
*
* This function operates on every element (e) of class "computer", and initializes
* all the necessary HTML to construct the Computer(s) as spec'ed.
*
* Note that each element (e) of class "computer" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Computer constructor
* expects.
* For every machine represented by an HTML element of class "pcjs-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.
*/
Computer.init = function()
{
@ -1240,6 +1238,12 @@ Computer.init = function()
/**
* Computer.show()
*
* When exit() is using an "onbeforeunload" handler, this "onpageshow" handler allows us to repower everything,
* without either resetting or restoring. We call powerOn() with a special resume value (RESUME_REPOWER) if the
* computer is already marked as "ready", meaning the browser didn't change anything. This "repower" process
* should be very quick, essentially just marking all components as powered again (so that, for example, the Video
* component will start drawing again) and firing the CPU up again.
*/
Computer.show = function()
{

View file

@ -4839,12 +4839,10 @@ if (DEBUGGER) {
/**
* Debugger.init()
*
* This function operates on every element (e) of class "debugger", and initializes
* all the necessary HTML to construct the Debugger module(s) as spec'ed.
*
* Note that each element (e) of class "debugger" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Debugger constructor
* expects.
* This function operates on every HTML element of class "debugger", extracting the
* JSON-encoded parameters for the Debugger constructor from the element's "data-value"
* attribute, invoking the constructor to create a Debugger component, and then binding
* any associated HTML controls to the new component.
*/
Debugger.init = function()
{

View file

@ -2469,11 +2469,10 @@ FDC.aPortOutput = {
/**
* FDC.init()
*
* This function operates on every element (e) of class "fdc", and initializes
* all the necessary HTML to construct the FDC module(s) as spec'ed.
*
* Note that each element (e) of class "fdc" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the FDC constructor expects.
* This function operates on every HTML element of class "fdc", extracting the
* JSON-encoded parameters for the FDC constructor from the element's "data-value"
* attribute, invoking the constructor to create a FDC component, and then binding
* any associated HTML controls to the new component.
*/
FDC.init = function() {
var aeFDC = Component.getElementsByClass(window.document, PCJSCLASS, "fdc");

View file

@ -2815,11 +2815,10 @@ HDC.aATCPortOutput = {
/**
* HDC.init()
*
* This function operates on every element (e) of class "hdc", and initializes
* all the necessary HTML to construct the HDC module(s) as spec'ed.
*
* Note that each element (e) of class "hdc" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the HDC constructor expects.
* This function operates on every HTML element of class "hdc", extracting the
* JSON-encoded parameters for the HDC constructor from the element's "data-value"
* attribute, invoking the constructor to create a HDC component, and then binding
* any associated HTML controls to the new component.
*/
HDC.init = function()
{

View file

@ -2177,12 +2177,10 @@ Keyboard.prototype.keySimulate = function(simCode, fDown)
/**
* Keyboard.init()
*
* This function operates on every element (e) of class "keyboard", and initializes
* all the necessary HTML to construct the Keyboard module(s) as spec'ed.
*
* Note that each element (e) of class "keyboard" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Keyboard constructor
* expects.
* This function operates on every HTML element of class "keyboard", extracting the
* JSON-encoded parameters for the Keyboard constructor from the element's "data-value"
* attribute, invoking the constructor to create a Keyboard component, and then binding
* any associated HTML controls to the new component.
*/
Keyboard.init = function()
{

View file

@ -635,12 +635,10 @@ Mouse.prototype.notifyMCR = function(bMCR)
/**
* Mouse.init()
*
* This function operates on every element (e) of class "mouse", and initializes
* all the necessary HTML to construct the Mouse module(s) as spec'ed.
*
* Note that each element (e) of class "mouse" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Mouse constructor
* expects.
* This function operates on every HTML element of class "mouse", extracting the
* JSON-encoded parameters for the Mouse constructor from the element's "data-value"
* attribute, invoking the constructor to create a Mouse component, and then binding
* any associated HTML controls to the new component.
*/
Mouse.init = function()
{

View file

@ -125,12 +125,10 @@ Panel.prototype.powerDown = function(fSave)
/**
* Panel.init()
*
* This function operates on every element (e) of class "panel", and initializes
* all the necessary HTML to construct the Panel module(s) as spec'ed.
*
* Note that each element (e) of class "panel" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Panel constructor
* expects.
* This function operates on every HTML element of class "panel", extracting the
* JSON-encoded parameters for the Panel constructor from the element's "data-value"
* attribute, invoking the constructor to create a Panel component, and then binding
* any associated HTML controls to the new component.
*
* NOTE: Unlike most other component init() functions, this one is designed to be
* called multiple times: once at load time, so that we can binding our print()

View file

@ -187,12 +187,10 @@ RAM.prototype.reset = function() {
/**
* RAM.init()
*
* This function operates on every element (e) of class "ram", and initializes
* all the necessary HTML to construct the RAM module(s) as spec'ed.
*
* Note that each element (e) of class "ram" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the RAM constructor
* expects.
* This function operates on every HTML element of class "ram", extracting the
* JSON-encoded parameters for the RAM constructor from the element's "data-value"
* attribute, invoking the constructor to create a RAM component, and then binding
* any associated HTML controls to the new component.
*/
RAM.init = function() {
var aeRAM = Component.getElementsByClass(window.document, PCJSCLASS, "ram");

View file

@ -330,12 +330,10 @@ ROM.prototype.addROM = function(addr)
/**
* ROM.init()
*
* This function operates on every element (e) of class "rom", and initializes
* all the necessary HTML to construct the ROM module(s) as spec'ed.
*
* Note that each element (e) of class "rom" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the ROM constructor
* expects.
* This function operates on every HTML element of class "rom", extracting the
* JSON-encoded parameters for the ROM constructor from the element's "data-value"
* attribute, invoking the constructor to create a ROM component, and then binding
* any associated HTML controls to the new component.
*/
ROM.init = function()
{

View file

@ -741,12 +741,10 @@ SerialPort.aPortOutput = {
/**
* SerialPort.init()
*
* This function operates on every element (e) of class "serial", and initializes
* all the necessary HTML to construct the SerialPort module(s) as spec'ed.
*
* Note that each element (e) of class "serial" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the SerialPort constructor
* expects.
* This function operates on every HTML element of class "serial", extracting the
* JSON-encoded parameters for the SerialPort constructor from the element's "data-value"
* attribute, invoking the constructor to create a SerialPort component, and then binding
* any associated HTML controls to the new component.
*/
SerialPort.init = function() {
var aeSerial = Component.getElementsByClass(window.document, PCJSCLASS, "serial");

View file

@ -5127,12 +5127,10 @@ Video.aEGAPortOutput = {
/**
* Video.init()
*
* This function operates on every element (e) of class "video", and initializes
* all the necessary HTML to construct every Video module as spec'ed.
*
* Note that each element (e) of class "video" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the Video constructor
* expects.
* This function operates on every HTML element of class "video", extracting the
* JSON-encoded parameters for the Video constructor from the element's "data-value"
* attribute, invoking the constructor to create a Video component, and then binding
* any associated HTML controls to the new component.
*/
Video.init = function()
{

View file

@ -2639,12 +2639,11 @@ X86CPU.prototype.stepCPU = function(nMinCycles)
/**
* X86CPU.init()
*
* This function operates on every element (e) of class "cpu", and initializes
* all the necessary HTML to construct the CPU module(s) as spec'ed.
*
* Note that each element (e) of class "cpu" is expected to have a "data-value"
* attribute containing the same JSON-encoded parameters that the CPU constructor
* expects.
* This function operates on every HTML element of class "cpu", extracting the
* JSON-encoded parameters for the X86CPU constructor from the element's "data-value"
* attribute, invoking the constructor (which in turn invokes the CPU constructor)
* to create a X86CPU component, and then binding any associated HTML controls to the
* new component.
*/
X86CPU.init = function()
{