It does not have Input (if someone is daring enough to add it - manipulating the registers, I think is the key) or Beeps, and it requires that you install the canvas package for Node JS.
This package requires the following libs
build-essential
libcairo2-dev
libpango1.0-dev
libjpeg-dev
libgif-dev
ibrsvg2-dev
This is to enable out-of-browser canvas's
I use the canvas package inside the Render Video and Pixel Buffer nodes
I also use node-red-contrib-image-tools to display the video
Deploy
Load the invaders ROM (public domain) - there are a few on the web for CHIP8
Click Start
The CPU executes various writes to the pixel buffer, and I wait for 80ms after the last write before rendering a frame - this seems to be a good middle ground for smooth video.
I print out the current executing Opcode and Args for that operation (just to feel like a real nerd )
Anyway this was fun - so enjoy
I'm sure some optimisations/improvements can be had
If not following: What has been achieved here, is Emulating A CHIP8 Console CPU with Node RED only
It's now become quite a project of mine, and has become an almost Full CHIP8 Console.
The following changes/break throughs have been made since I last posted:
No longer needs ANY external lib/Node RED Module
The rendering is now achieved with a Native Canvas object in a browser window (HTTP IN)
I have employed a type of RFB to send pixel changes over a web socket to the Browser window
Now Supports Input. YES!!! you can now play the games
Now renders Audio - square wave only. YES!!! audio is now rendered
Click the title (this is to allow audio to be played - most browsers require interaction for audio to be allowed) - the video panel should go black
Go back to the flow editor, Inject your chosen ROM (I have included 2)
Inject Start
There are some CPU instructions that I need to fix - but mostly its playable.
To load a new ROM - you have to redo the above steps (you might need to disable/enable the flow - Hey it's a Console being emulated in Node RED, give me a break
Enjoy.
Keys for Space Invaders as example.
W - Start new Game / Fire Q - Move Left E - Move Right
This whole thing started when @cymplecy implemented an MQTT Broker in Node RED - so wanted to push the bounderies of what is possible after seeing his work.
I have updated the CPU Clock - it now runs a lot faster
You can now load a new ROM without reinitializing everything
Just be sure to inject Start after loading a new ROM - and to follow the initial Init routine above
W - Start new Game / Fire Q - Move Left E - Move Right
I was about to write something very positive about your work, but then i realised what abomination of inputs you used. How dare you to ignore the mighty WASD?!
You can probably change it all.
But the array in the page Node for the map will need updating + maybe updating the CPU instruction for Input. It's shifting bits based on the index