-------- What the fridge does this patch do? Will it make me coffee while designing levels? --------
*record scratch* Before you proceed with this tutorial, please keep in mind that it was written a long while ago, and it is probably outdated. The Readme included with the SA-1 Pack is probably your best resource for help regarding the insertion of this wonderful patch.
This patch enables the use of the SA-1 chip in Super Mario World. It will also make sprites and level load run on SA-1 to benefit from its superior processing speed.
- It also modifies the sprite engine so the maximum of sprites on-screen is now 20! Even with that much sprites, even with 20 Chucks, the game still shouldn't lag! Now you're playing with Power! S(A-1)UPER Power!;
- Allows up to 255 sprites per level;
- Adds support for 6MB and 8MB ROMs! However, 8MB ROMs will only work on bsnes, ZMZ and Snes9x v1.54 or later. 6MB ROMs are fine, though;
- Adds a shitload of other advanced stuff I didn't understand (this is a beginner's guide so I won't go in much details);
On a side note, the functionality to make your oh-so-needed morning coffee wasn't implemented yet. Expect it to happen around year shut up.
-------- Drawbacks --------
So, before we get started, I should point out a few drawbacks regarding this patch. For starters, most ASM resources will not work right off the bat.
This is because most of the game's RAM addresses have been remapped to somewhere else in the RAM, where the SA-1 can access it.
So, to use patches, sprites and blocks from the site, you'll have to convert them first. Sprites do have an automatic converter for them, though. More on conversion later.
Fortunately, we have a converted version of Sprite Tool, AMK and LM v2.20+ support SA-1 natively and Asar doesn't care.
However, blocks are different: BTSD is not usable on a SA-1 ROM. Fortunately, we have the Manual Custom Block Inserter Patch (will be referred to as MCBI from now on), of which an SA-1 version exists. Again, more on that special case later. Gopher Popcorn Stew (GPS), the new custom block inserter, supports SA-1!
-------- Getting Started --------
To use the patch, you'll need the following items:
- The patch;
- A CLEAN SMW ROM;
- Asar;
- Lunar Magic v2.20 or later.
(Not mandatory: GPS, Sprite Tool, AMK)
I recommend placing the patch in a separate folder with Asar, as there is a lot of files.
These are pages that contain SA-1 adapted tools and converted resources:
List of compatible Tools
List of compatible Patches
List of compatible Blocks
List of compatible Sprites
Please note that, even though blocks are converted to SA-1 addressing, they still need to be adapted to MCBI format, more on that later.
If what you seek isn't converted yet, you can try doing so yourself. When done, send it to Vitor Vilela so he can add it to the list, please :3
---- Instructions ----
Okay, now that you have the prerequisites, let's get shit done, shall we?
First, open your ROM in Lunar Magic. You must expand the ROM to 1, 2, 3 or 4MB WITHOUT DOING ANYTHING ELSE! To do so, go in File -> Expand ROM -> Expand ROM to xMB (I chose 4MB). Now, immediately close LM.
Copy your ROM to the "SA-1 Pack" folder.
Now, run Asar.exe. It will ask you what you want to patch. Here, write sa1.asm, and press Enter. Now, it will prompt you for your ROM's filename. Input it and press Enter. It will then initiate the patching phase. When done, it will tell you so.
Open your ROM in your emulator of choice. Most emulators (read: not bsnes/Higan) will display infos about your ROM at startup. If they mention anything about SA-1, then this means you successfully patched the patch!
You should also notice that the Nintendo Presents screen is much shorter, as are all loading screens. Go in YOSHI'S ISLAND 2, and notice how the row of Koopas there does not make the game lag anymore. Victory!
Now, copy your ROM back to where LM is, and open your ROM in LM. Go in Options, and near the bottom, you will notice the "Use SA-1 RAM Remap for this ROM" option has been automatically checked. Another sign that we succeeded.
IMPORTANT: The No More Sprite Tile Limits Patch (and the extended version) is integrated in this patch and you need to use Sprite Memory 10 in every level you use, or else sprites will start disappearing! (can be changed by clicking on the Lakitu button).
-------- Expanding the ROM to 6 or 8MB --------
To expand your ROM to these sizes, go in File -> Expand ROM and choose one of the two SA-1-specific options. Simple as *insert fancy french word*!
-------- General Conversion --------
So, you've got this handsome piece of ASM (blocks, sprites, patches), but you need to convert it to SA-1 prior to using it.
Sprites can be automatically converted using the SA-1 Sprites Converter. But you have to convert patches and blocks yourself. I'll teach you how.
The things you need to convert are RAM addresses. In ASM code, you can find them like this:
ABC $XX
ABC $XXXX
ABC $XXXXXX
...Or like this:
!DEFINE = $XX
[...]
ABC !DEFINE
Also, if the opcode (the 3-letters thingy at the left) starts with "J" or "B", the address is not RAM.
The addresses with 2 digits do not need to be changed. This already covers most of what you'll see!
Addresses with 4 digits need to be changed:
- $0000-$00FF -> $3000-$30FF;
- $0100-$0FFF -> $6100-$6FFF;
- $1000-$1FFF -> $7000-$7FFF.
These are the conversions for 6-digits addresses:
- $7E:C800-$7E:FFFF -> $40:C800-$40:FFFF;
- $7F:C800-$7E:FFFF -> $41:C800-$41:FFFF;
- $7F:9A7B-$7F:9C7A -> $41:8800-$41:89FF;
- $70:0000-$70:07FF -> $41:C000-$41:C7FF;
- $70:0800-$70:27FF -> $41:A000-$41:BFFF.
However, if an address is a sprite table, it becomes much more complicated, and the conversion isn't the same.
A list of all sprite tables and their new location can be found in SA-1 Pack\docs\Sprite Remap.txt.
Additionally, here are the new custom sprite tables (added by Sprite Tool):
- $7FAB10 -> $6040
- $7FAB1C -> $6056
- $7FAB28 -> $6057
- $7FAB34 -> $606D
- $7FAB9E -> $6083
Finally, if you see an address that does not fit in any of the aforementioned ranges, you do not need to change it.
PFHEW! Done. This should cover everything, I hope.
-------- Inserting Blocks --------
This used to be more complicated, but now you can simply use GPS. You still need to convert the blocks, though.
-------- Conclusion --------
So, this tutorial doesn't cover using the SA-1's special functions in your own code because I would myself need a tutorial for that. I don't know shit.
Sorry.
*record scratch* Before you proceed with this tutorial, please keep in mind that it was written a long while ago, and it is probably outdated. The Readme included with the SA-1 Pack is probably your best resource for help regarding the insertion of this wonderful patch.
This patch enables the use of the SA-1 chip in Super Mario World. It will also make sprites and level load run on SA-1 to benefit from its superior processing speed.
- It also modifies the sprite engine so the maximum of sprites on-screen is now 20! Even with that much sprites, even with 20 Chucks, the game still shouldn't lag! Now you're playing with Power! S(A-1)UPER Power!;
- Allows up to 255 sprites per level;
- Adds support for 6MB and 8MB ROMs! However, 8MB ROMs will only work on bsnes, ZMZ and Snes9x v1.54 or later. 6MB ROMs are fine, though;
- Adds a shitload of other advanced stuff I didn't understand (this is a beginner's guide so I won't go in much details);
On a side note, the functionality to make your oh-so-needed morning coffee wasn't implemented yet. Expect it to happen around year shut up.
-------- Drawbacks --------
So, before we get started, I should point out a few drawbacks regarding this patch. For starters, most ASM resources will not work right off the bat.
This is because most of the game's RAM addresses have been remapped to somewhere else in the RAM, where the SA-1 can access it.
So, to use patches, sprites and blocks from the site, you'll have to convert them first. Sprites do have an automatic converter for them, though. More on conversion later.
Fortunately, we have a converted version of Sprite Tool, AMK and LM v2.20+ support SA-1 natively and Asar doesn't care.
-------- Getting Started --------
To use the patch, you'll need the following items:
- The patch;
- A CLEAN SMW ROM;
- Asar;
- Lunar Magic v2.20 or later.
(Not mandatory: GPS, Sprite Tool, AMK)
I recommend placing the patch in a separate folder with Asar, as there is a lot of files.
These are pages that contain SA-1 adapted tools and converted resources:
List of compatible Tools
List of compatible Patches
List of compatible Blocks
List of compatible Sprites
Please note that, even though blocks are converted to SA-1 addressing, they still need to be adapted to MCBI format, more on that later.
If what you seek isn't converted yet, you can try doing so yourself. When done, send it to Vitor Vilela so he can add it to the list, please :3
---- Instructions ----
Okay, now that you have the prerequisites, let's get shit done, shall we?
First, open your ROM in Lunar Magic. You must expand the ROM to 1, 2, 3 or 4MB WITHOUT DOING ANYTHING ELSE! To do so, go in File -> Expand ROM -> Expand ROM to xMB (I chose 4MB). Now, immediately close LM.
Copy your ROM to the "SA-1 Pack" folder.
Now, run Asar.exe. It will ask you what you want to patch. Here, write sa1.asm, and press Enter. Now, it will prompt you for your ROM's filename. Input it and press Enter. It will then initiate the patching phase. When done, it will tell you so.
Open your ROM in your emulator of choice. Most emulators (read: not bsnes/Higan) will display infos about your ROM at startup. If they mention anything about SA-1, then this means you successfully patched the patch!
You should also notice that the Nintendo Presents screen is much shorter, as are all loading screens. Go in YOSHI'S ISLAND 2, and notice how the row of Koopas there does not make the game lag anymore. Victory!
Now, copy your ROM back to where LM is, and open your ROM in LM. Go in Options, and near the bottom, you will notice the "Use SA-1 RAM Remap for this ROM" option has been automatically checked. Another sign that we succeeded.
IMPORTANT: The No More Sprite Tile Limits Patch (and the extended version) is integrated in this patch and you need to use Sprite Memory 10 in every level you use, or else sprites will start disappearing! (can be changed by clicking on the Lakitu button).
-------- Expanding the ROM to 6 or 8MB --------
To expand your ROM to these sizes, go in File -> Expand ROM and choose one of the two SA-1-specific options. Simple as *insert fancy french word*!
-------- General Conversion --------
So, you've got this handsome piece of ASM (blocks, sprites, patches), but you need to convert it to SA-1 prior to using it.
Sprites can be automatically converted using the SA-1 Sprites Converter. But you have to convert patches and blocks yourself. I'll teach you how.
The things you need to convert are RAM addresses. In ASM code, you can find them like this:
ABC $XX
ABC $XXXX
ABC $XXXXXX
...Or like this:
!DEFINE = $XX
[...]
ABC !DEFINE
Also, if the opcode (the 3-letters thingy at the left) starts with "J" or "B", the address is not RAM.
The addresses with 2 digits do not need to be changed. This already covers most of what you'll see!
Addresses with 4 digits need to be changed:
- $0000-$00FF -> $3000-$30FF;
- $0100-$0FFF -> $6100-$6FFF;
- $1000-$1FFF -> $7000-$7FFF.
These are the conversions for 6-digits addresses:
- $7E:C800-$7E:FFFF -> $40:C800-$40:FFFF;
- $7F:C800-$7E:FFFF -> $41:C800-$41:FFFF;
- $7F:9A7B-$7F:9C7A -> $41:8800-$41:89FF;
- $70:0000-$70:07FF -> $41:C000-$41:C7FF;
- $70:0800-$70:27FF -> $41:A000-$41:BFFF.
However, if an address is a sprite table, it becomes much more complicated, and the conversion isn't the same.
A list of all sprite tables and their new location can be found in SA-1 Pack\docs\Sprite Remap.txt.
Additionally, here are the new custom sprite tables (added by Sprite Tool):
- $7FAB10 -> $6040
- $7FAB1C -> $6056
- $7FAB28 -> $6057
- $7FAB34 -> $606D
- $7FAB9E -> $6083
Finally, if you see an address that does not fit in any of the aforementioned ranges, you do not need to change it.
PFHEW! Done. This should cover everything, I hope.
-------- Inserting Blocks --------
This used to be more complicated, but now you can simply use GPS. You still need to convert the blocks, though.
-------- Conclusion --------
So, this tutorial doesn't cover using the SA-1's special functions in your own code because I would myself need a tutorial for that. I don't know shit.
Sorry.