Chip8 Emulator. This object acts as global namespace and thin proxy to the most important CPU methods.
Classes
Methods
-
<static> halt()
-
Halts processing. CPU performs idle loop.
- Source:
- See:
-
<static> initialize(params)
-
Initializes emulator and its default modules.
Parameters:
Name Type Description paramsProperties
Name Type Description screenchip8.Screen emulator screen instance. If omitted, default chip8.CanvasScreen is created.
ctxCanvasRenderingContext2D context of canvas element which acts as default emulator screen, if params.screen is not specified.
audiochip8.Audio audio module, chip8.Audio instance by default
keyboardchip8.Keyboard keyboard module, chip8.Keyboard by default.
-
<static> keyDown(key)
-
Simulates key down.
Parameters:
Name Type Description keynumber key number (0x0 - 0xF)
- Source:
- See:
-
<static> keyUp(key)
-
Simulates key up.
Parameters:
Name Type Description keynumber key number (0x0 - 0xF)
- Source:
- See:
-
<static> reset()
-
Resets state of CPU and all peripherals.
- Source:
- See:
-
<static> resume()
-
Resumes CPU from halted state.
- Source:
- See:
-
<static> run()
-
Starts processing.
- Source:
- See:
-
<static> stop()
-
Stops processing.
- Source:
- See: