A CHIP-8 implementation for Unity 3D, based on Laurence Muller's tutorial, "How to write an emulator (CHIP-8 interpreter)"
First, import the UniCHIP asset package into your project.
- Drag a UniCHIP8 prefab from the prefabs folder into your scene.
- Optionally, type in the name of a ROM file located in the Roms folder
- Ensure the UniCHIP8's Power State property is checked
- Position the camera near the quad so it takes up most of the view
- Press Play in the Unity Editor
- Create a quad named Screen
- Assign the UniCHIP8Screen material to it
- Create an empty GameObject named UniCHIP8
- Add the UniCHIP8 component to the UniCHIP8 GameObject
- Assign your Screen quad to the UniCHIP8's Screen Object property
- Optionally, assign the beep sound to the UniCHIP8's Speaker Sound property
- Optionally, type in the name of a ROM file located in the Roms folder
- Ensure the UniCHIP8's Power State property is checked
- Position the camera near the quad so it takes up most of the view
- Press Play in the Unity Editor
UniCHIP8 offers a number of custom opcodes to interact with your scenes.
To enable UniCHIP8 Extensions:
- Disable the Compatibility Mode property on your UniCHIP8 instance
- Add a UniCHIP8 Router from the prefabs folder
- Assign it to the Router property on your UniCHIP8 instance
To make the UniCHIP8 aware of other GameObjects in a scene, they must have the UniCHIP8Node component on them and have a UniCHIP8Router assigned.
Misc
test call broadcast
send reparent destroy
Transform
move rotate scale
moveX rotateX scaleX
moveY rotateY scaleY
moveZ rotateZ scaleZ
lookAt
Create
create createCube createSphere
createCylinder createCapsule createPlane
createQuad createEmpty createDirectionalLight
createPointLight createSpotLight
Materials
addMaterial setMaterialColor
Lights
setLightColor setLightIntensity
Machine state
clockMultiplier logging compatiblityMode
pause halt powerDown
See the UniCHIP8 wiki for more information.
UniCHIP8 is made available under the MIT license. See LICENSE.md for additional details.
The default UniCHIP8 system beep sound is modified from beep-6 in "Interface beeps"