![]() |
| Basic SMS Programming |
| Tools of the Trade | Background Color |
Before you get started with your programming, you're going to need to download a few items. The following section of goodies is built for PC users. If you're on a MAC, there's no hope for you so give up right now. The majority of the information you're seeing here was originally supplied by Maxim over at SMSPower. The reason for putting it all here is so that, again, everything in this tutorial has its place and can be located without needing to look all over the internet. This will also serve as another source for the same downloads in case anything should ever happen to the original pages. The links were originally organized by him and are placed here with his permission.
The first thing to do before downloading everything is set up a folder on your computer so everything is in one place. Go to Program Files in 'My Computer'. Create a new folder by right-clicking on a blank spot. Call it something like 'Master System Programming' or whatever you like, though the shorter it is the better. Everything you'll be downloading will be placed there.
The first thing to nab is a text editor. A text editor is a program that allows you to work with the code you write. With it, you can then create output files that can be run through an emulator. Your output files are ROMs you normally use to play SMS games on your computer. The text editor we'll be using is ConTEXT. It's a freeware program that you can get for nothing by going to their site here. However, in case that ever doesn't work for some reason, we will keep updating with the newest version for you to download directly from us. Do so below.
In addition, Maxim created a cool file that highlights certain areas of code so it's easier to read when you use ConTEXT. Download this next directly below.
Make sure you save this file within the Context folder that appears in the folder you originally created. Don't put it outside of the Context folder, otherwise it won't work properly. It's a WinZip file, so once you access it, save the file within the Context folder called 'Highlighters'. This folder will be located inside the ConTEXT folder. Once you open 'Highlighters', place the Syntax Highlighter file into this folder.
Next, you're going to need your assembler. The assembler is the program that's going to take the code you write and put it together so it can be used. We're working with WLA DX. All the necessary materials, including the readme file, can be downloaded at the site here. But, just in case, we have the file saved onto our system, so to save yourself some time if you like, just download it directly below. Once you have this file, read below to see what to do next.
Alright, once you have that, make a folder within the ConTEXT folder called 'WLA DX'. Open it, and unpack the file above in this new folder you've just opened. There are also some compiled binaries you will need to download. Here they are.
Once you download this initial file, open it. Place the WLA Instructions (it will be a TEXT, or txt, document) in your initial programming folder that you created. Place the license here as well. The rest of it you should place within your WLA DX folder.
Next, once we have our output we're going to need something to run it through. An emulator is what we need, and it's doubtful anyone reading this doesn't know what it is. But, in case you don't, it's a program that plays ROMs so you can play various games from your computer without a console or even controllers. There are a few for the Master System, such as Bock's Meka. I prefer to use Dega because it's a lot simpler and we really don't need to have a lot of fancy tech data all over the place. We just need something that will show what our output does without too much trouble. Dega has a really simple set of drop down commands, not much other than 'insert ROM', 'reset', and the like, which is all we need. You can download the latest version of Dega below or just skip this step if you already have an emulator that you use.
You should be putting this in its own folder or simply by itself outside of your programming folder. Just unpack and set it up somewhere in your basic 'Program Files' section of your PC. It doesn't need to be in your programming folder and it's something you'll be using for other things anyway. Alright, next, along with your text editor, assembler, and emluator, you need a way to check your source code for problems and test them. This is done with a debugger. The one we'll be using is Emukon. Read about it here. After that, download it there, or in case there are any problems, just download it directly below.
Make it it's own folder within your programming folder and place all the files in there. Then, you need a disassembler, a program that takes machine language (binary and hex) and translates it into assembly for us to work with. It's the exact opposite of an assembler. We'll be using the one found directly below.
Along with all of the above, there is some documentation you should download for reference. They can all be found here at SMSPower, but for ease in access and to safeguard any future loss, they've been duplicated and put into our system here. By simply clicking below you can get what you need. Download the following and save them into your programming folder for reference or print them out for happy reading!
- SMS/GG Hardware Notes
- Sega Master System Technical Information
- Official SMS/GG Documentation
- Z80 Family CPU User Manual
- SMS VDP Documentation
- SMS Memory Mapper and Hardware Notes
Okay, so once you have all the tools and references above, start looking over everything. Don't try to use anything of it yet, with the exception of the emulator. These are the main things you're going to be using when we get started on the next page, but there will be a few items to download later when the time comes, such as Maxim's bitmap-to-tile converter, which you'll use to take image files and convert them into code for usage in your programs so you don't have to do them by hand. Now then, since we have everything ready, let's finally get started with our first program and get that emulator to show off one whole screen of color! On the next page you'll learn how to set up Context and then check out our first program.
Main Page
Next Page






