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 params
Properties
Name Type Description screen
chip8.Screen emulator screen instance. If omitted, default chip8.CanvasScreen is created.
ctx
CanvasRenderingContext2D context of canvas element which acts as default emulator screen, if params.screen is not specified.
audio
chip8.Audio audio module, chip8.Audio instance by default
keyboard
chip8.Keyboard keyboard module, chip8.Keyboard by default.
-
<static> keyDown(key)
-
Simulates key down.
Parameters:
Name Type Description key
number key number (0x0 - 0xF)
- Source:
- See:
-
<static> keyUp(key)
-
Simulates key up.
Parameters:
Name Type Description key
number 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: