|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.
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.
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.
here. After that, download it there, or in case there are any problems, just download it directly below.
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.