I am back! I had to take a hiatus from working on this project for the past several months, but over the past few weeks I have been busy. My most recent advancement is a playground!
The playground is a web application that simplifies developing games for Dodo by having an IDE and Simulator that run as a hosted service. For everything developed there is a shareable link that is generated.
For instance here is a a link to the game 0xDEADBEEF
Note that it is not playable on a mobile device at the moment
The playground was a concept that I wanted to pursue since the beginning of the project. I thought it would be awesome to bring 6502 development into the cloud era. Having a Web IDE with an integrated simulator lowers the barrier to entry to get people to experiment with the project, and for my own development it seriously improves the speed at which I can iterate.
The first step was to write a simulator, which I did a while back in the language Go. The initial simulator ran as a console application. I then developed a web version that used Websockets to stream the graphics from a backend server to the client in real-time. The approach of running the simulation in the cloud worked, but it just consumed too many resources and scaling it would be difficult.
The development language for Dodo is 'C' and it is compiled using cc65. The playground works by hosting cc65 in the cloud.
Here is roughly how the whole system works:
- The code starts by requesting the firmware from the website, as well as the 'C' code associated with the particular hyperlink
- The code is then placed within the Ace editor that is running locally in the browser
- When the user clicks Run it sends the 'C' code back up to the cloud where it attempts to compile it.
- The web service returns either with the compiled game as a chunk of bytes, or an error message
- If it gets the firmware it then fires up the simulator with the game and it all runs local
With this design the heavy lifting is mostly done by the client. The server just has to compile the code. This is also scaleable.
I also made some advancements with the simulator. Because there is an easy to use Audio API in most browsers, I was able to get sound simulated fairly easily. I also pulled it into its own library so it could be embedded in other contexts.
Here are some other playground links:
Here is the repository on Github