(also available as a Google Doc)
In this tutorial, I will teach you how to insert custom blocks with the aptly named Gopher Popcorn Stew, more commonly known as GPS.
GPS is the successor to Blocktool Super Deluxe. It does many things better than it, here’s some of its advantages:
- While still having a GUI version, GPS is a very simple command line tool, which makes it a lot easier to use.
- It stores the blocks to be inserted in a text file rather than a proprietary database. This makes it easier to add new blocks and see what’s inserted.
- It supports setting the acts like value of the Map16 tiles during insertion. You can do it in Lunar Magic, but this is just more convenient.
- It has full SA-1 compatibility if your blocks are written with it in mind, too.
- It supports shared routines, which saves space in your ROM.
What do I need?
As mentioned above, you can either make a block with Blockreator or download ones from the custom blocks section of SMWCentral.
Blockreator is fairly simple to use. The purpose of this tutorial is not to teach you about Blockreator, however. After you make your block, click “Generate Code” and copy the code you get into a blank .asm
Blocks you download from the custom blocks section come in a .zip file. Inside, you should find a .asm file. That’s your block. If there are multiple .asm files, then the submission probably consists of more than one block. There might be a readme, which will probably explain what is what.
Once you get your blocks, you should put them in the blocks
folder that GPS comes with. For this tutorial, I’ll be using the Destroy Yoshi
block from the blocks section and a simple Blockreator block, which shatters when hit with a fireball. I suggest renaming them so you easily know what they are. Note that you can’t have spaces in the names.
The list file
In the main folder of GPS you should find a file named list.txt
. This is your block list and it is where you put in the name of your blocks and where they should go.
It has a simple format. Each line in the file represents a single block which should be inserted and it looks like this: you put the Map16 number under which the block should go, then, if you want to set its acts like value, a colon, followed by the acts like value. After that, you put in a tab or a space and you type the block’s name within the blocks
folder, extension included.
Here’s an example list.txt:
In this case, GPS will put ShatterOnFireball.asm
as block 300 (first block on the third page in the Map16 Editor) and make it act like 130 (the cement block). It will put DestroyYoshi.asm
as block 301 and it will not change its acts like value because there is no colon. Blank lines are ignored.
Release the Kraken!
After you’ve made the list, it’s time to open gps.exe
It’s fairly obvious what you need to do: you should enter your ROM’s name, including the extension. It’s generally safer to not have spaces in the name, surround your ROM’s name with “quotes” if the name does have spaces. If you’re not using Windows Vista, you can also drag your ROM on top of the black window. Either way, press Enter after typing in the name.
If all went well, you should get a nice little message saying so:
First, it tells you that it added in the shared routines from the routines folder. You don’t need to mind this, unless you’ve messed with them.
Press Enter to close GPS. Congratulations!
Using your blocks
All you need to use your blocks is to insert the Map16 block that you mapped the ASM files to. In my case, I’d insert block 300 into my level if I want the shatter on fireball block.
I recommend inserting your blocks into one generalized area, for example the lower half of page 3, and making other blocks act like them to conserve space. For example, I can insert the Destroy Yoshi block as block 350 and then make other blocks, let’s say 4A3, 553 and 838, act like 350 to have them all destroy Yoshi without inserting the block three more times.
Frequently asked questions
- What if I want to insert more blocks after using GPS?
- Just add them to your list and run GPS again. It’s safe to use it as many times as you want on the same ROM.
- What if I’ve already used Blocktool Super Deluxe on my ROM?
- GPS automatically removes the code from BTSD when it’s run for the first time. You won’t have to use a new ROM.
- Error: Couldn’t open “*.smc”
- This means that GPS couldn’t find your ROM. Make sure you spelled the name properly. If that still doesn’t work, make sure there are no spaces in it. Try dragging the ROM into GPS if that doesn’t work either.
- Error: blocks/*.asm: error: Couldn’t open file
- A block you have put in list.txt is not present within the blocks folder. Make sure the names match and that your block’s extension is .asm, not .txt.
- Error: block_boilerplate.asm:*: error: Unknown command. [incsrc blocks/*.asm]
- This is generally caused by having spaces in your block names.
- Error: blocks/*.asm:*: error: Unknown macro
- This is generally caused by deleting files from the routines folder. Don’t touch it unless you know what you’re doing.