Editing ASMs - RetroKoH/S1Fixed GitHub Wiki
A vast majority of your disassembly is going to consist of text files, containing instructions and data. These text files have the extension .asm, and can be opened by any text editor. I use Notepad++, but you are free to use any text editor you'd like. Just... don't use Windows Notepad. Save yourself the headache.
Here is a list of recommended text editors with which to edit .asm files within the disassembly:
- Notepad++
- Sublime
- Zed (for Mac/Linux users)
- Visual Studio Code
From there, you'll want to know where everything is located, since the game's code is split into various files stored in different folders. Here is a general outline:
sonic.asm - The main file used to build the ROM. Everything that goes into the game is either in this file, or it is in another file that is included into this file.
Constants.asm - Here are labels that represent constant values used throughout the game's code. These are important, because they nake the code more readable, and easier to understand as a result.
Variables.asm - Here are labels that represent RAM addresses used by the game. This is a massive list, sorted in ascending order.
_screens - This folder contains code for every screen mode in the game.
_player - This folder contains nearly all code pertaining to Sonic and/or any other playable character(s) that may exist in the disassembly, along with relevant subroutines.
_incObj - This folder contains object code for every non-player object in the game, along with a vast majority of the subroutines they call upon.
_inc - This is a miscellaneous folder containing important code and data that doesn't really fit into the other folders.
_maps - This folder contains sprite map files. Because S1Fixed uses MainMemory's MapMacros, these can be edited with relative ease, straight from the text file, though you are still encouraged to use Flex2 for such a task.
_anims - This folder contains animation scripts used by various objects in the game. These need to be edited via text, as there is currently no dedicated animation editor available.
Guides for editing various forms of code and data are in the works. Links to each folder will be included as well.