Converting any game to SA-1 involves digging though various processes and it takes a considerable amount of time. Gradius III took around three months and most of the spent time was for generating the remap files, required for moving the game memory to the SA-1 CPU visible area. Below you can see the complete conversion diagram.
The game must be completely disassembled. DiztinGUIsh is used to generating the game disassembly, but it requires you manually reviewing the code for making sure it’s disassembling correctly. It involves at least the following:
- Separating code and data blocks;
- Checking for opcode sizes and alignment; and
- Making sure all code blocks are connected to each other.
With the disassembly done, you now have to run though SA-1’s The Last Remap tool for generating the needed remap files and afterwards analyze the game disassembly to figure out if the remapped memory locations should be applied or not. The particular process I won’t be explaining on this article, but assume that it takes a lot of time. For example, on Gradius III, 380 of the 871 indexed absolute opcode remaps had to be reviewed and manually removed by myself one by one because the game had another context on these opcodes and they were indirectly responsible for half of the game crashes during the beta patch testing phrase.
This is the main reason that it’s so hard to convert new SNES games to SA-1. In another post I will explain why is that needed, but without the game disassembly and the game remap, it’s impossible to move the game logic to the SA-1 CPU, responsible for the 10.74 MHz processing.
Recently however I found out that with bsnes-plus you can not just output trace logs, which are dumps of the game logic code (but different from disassemblies!) but also a binary file called usage map. The usage map contains some useful information about the ROM, such as which blocks are considered code, data and some of the opcode control flags.
Editing a menu option on bsnes-plus, you can export the usage map and together the trace log you can pretty much generate the entire game disassembly and its context by just playing the game! The main drawback is that you have must playthough the entire game for complete coverage. The more you play, the more different enemies, effects, stages and bosses you reach, the more the emulator will know about the ROM and more reliable the output disassembly will be.
Some games like F-Zero you can generate a reliable disassembly by playing it around a half hour, but others like Secret of Mana you would need to play the game for several hours, trigger different events, play with all magic combinations and try reaching out most of the areas.
However the good thing is that with the information available, a SA-1 game conversion that would take several months to be complete, can be reduced to only a couple of weeks using this strategy.
I edited both DiztinGUIsh and SA-1 TLR for using the usage map and/or trace log for automatically analyzing most of the manual work done by me. With that, I can focus on actually optimizing the game which is the process done on the right side of the diagram. The manual work of the remap process is now just a matter of playing the game!
Now you can help me!
The process of generating trace log and usage map is so easy that you can now directly help me generating the analysis files! Combine that with several people available to play, we won’t be just able to convert games faster but also do several games at the same time!
You can download the version 04 of bsnes-plus here: https://github.com/devinacker/bsnes-plus/releases/tag/v04. Download and extract the 7-zip file and open “bsnes.exe”.
Please note that it you must use version v04, because the most recent bsnes-plus versions will not work with this approach.
Load a SNES game by either System → Load Cartridge on the main menu or by drag-dropping the game directly on the main window. Make sure to configure the video and audio drivers on Settings → Configuration if needed.
Before playing, we should enable trace logging and save usage maps on disk. For doing that, click Tools → Debugger (1). The debugger window should open. On its right side, check “Enable trace mask” (2) first then “Trace S-CPU opcodes” (3). Then (4) click Misc → Options (5) and mark “Cache memory usage table to disk” (6). Then make sure to restart your game via System → Reset.
You can use save states and rewinds without problem. With that, the only thing left to do is playing the game! Play it and explore the most different possible combinations and endings.
Before leaving the emulator however, unmark “Trace S-CPU opcodes” (3) for marking sure the trace log file is properly written. Once you exit, bsnes-plus should output the following files on the ROM folder:
IMPORTANT! If you play the game again after generating the files, you must rename the trace log file to another name because if you play it again and enable trace logging, the previous file will be completely overwritten and lost! So make sure to rename it, for example, “game-name-trace-1.log”, “game-name-trace-2.log”, etc. Usage maps does not have that problem.
Compress these files to a .zip, .7z or .rar file and submit it to me, either though e-mail vitor.vilela.mario at gmail.com or Discord Vitor Vilela#1930. With that information I will be able to convert any game to SA-1 much better and faster.
I’m accepting any game that does not use any enhancement chip, with the exception of the DSP 1-4 games. If you don’t have any game in mind, I have the following suggestions:
- Act Raiser
- Act Raiser 2
- Contra III
- Demon’s Crest
- Race Drivin’
- R-Type III
- The Legend of Zelda – A Link to the Past
- Secret of Mana
- SimCity 2000
- Super Castlevania 4
- Super Ghouls ‘N Ghosts
- Super Mario All-Stars
- Super Metroid
- Super R-Type
Keep in mind that even if you submit any game trace log and usage map, it does not mean that it will get a SA-1 conversion! There are several factors behind a conversion, but submitting it you will increase the chances of the conversion happening drastically!
Ready for playing your favorite game again with hopes for a SA-1 conversion?!