As promised, here is the full source code for the Snake game. Hopefully, this will give you some ideas on how to create your own game... and probably a good lesson on what not to do. I am by no means an expert in 6502 code... as you'll see.

First and foremost, I want to give mad props to two websites (that I already mentioned in the learning to code post) that are fantastic tools and should be a part of your tool kit. Easy 6502 http://skilldrick.github.io/easy6502/ is fantastic at taking you step by step through programming and full source code for a Snake game. That code was the basis for this Snake game. It was my initial test bed to make sure my 6502 emulator was working. I figured if it could run that code then I was good. From the very beginning I wanted to release my Wasteland Snake code to help people develop 6502 code, but I thought it would be even better to base it off their open-source code so you could start off with a simpler version and really learn how it works, then see how it was modified to be more of a complete game and fitting within the Wasteland 2 6502 computer. I changed it quite a bit, but the foundation is there and should be recognizable. Please spend time with his code and tutorial. It's a fantastic site and playground to test out 6502 code (though be aware you won't be able to use code directly as the memory mappings and capabilities are quite different). The second is an assembler http://www.masswerk.at/6502/assembler.html that is a little limited, but fantastically simple to use. It also does a great job throwing errors to help you get your code right. The below code won't quite work with it as is, but much of your own code can leverage his tool to create the op code you need for a binary. In any assembler, make sure you can set the starting address to 0x7000 for the Wasteland 2 computer. I used a variation of his tool for my own personal needs, changing the output and allowing for longer labels. But, his tool too should be given mad props and high honor. One of the limitations was defining .BYTE and .WORD. Other assemblers allow for a series of bytes to be defined like a string of text as a resource in the code. His assembler, however, is limited in this respect. I created a little work around Ruby script to generate labels for building strings that I could just cut and paste in. It's ugly as hell but works for this situation... thus the painfully long and obnoxious labels and word definitions at the end to create labeled text strings. If you want to assemble this directly, you can use my modified version of his tool, http://jobybednar.com/6502/index.html, but I wanted to give him props for the original.

I would love to hear what assemblers you are using. I tried to leverage freely available online tools so anyone could get into this, but if you have the killer 6502 development tool, please do share it.

6502 assembly code needs to be specific to both your assembler and the "computer" it will run on. It might take some minor tweaks to get it to work with your tools... but hopefully you can take this and run with it!