Reading the Music Engine Control tables
Reference (main hub and link to subpages)
Information may vary in order of presentation, but at a minimum, The game title, trigger, vgm pack status, and resources are listed. Sometimes the developer(s) is listed as well. It is generally omitted on developer centric pages, as it would be redundant.
Game title: Lists all known titles and links to the game page, making it easier to obtain information about the game in question. It is always a good idea to visit the game page before starting work to see what codes/features/information is available, and what you will need to discover yourself. Cheats for sound tests are sometimes listed, and should be used to save work/time. However, beware that not all music is necessarily available through the sound test.
Company: Listed in the global categories pages (i.e all SMS/GG/SG). It can be helpful to see which games are made by the same developer. This will often (not always) inform you about the features of the sound engine and how to use it. Games made by the same developer will often have alot of similarities. It can help you explore more intelligently. You can lose alot of time trying to hack a game, only to discover it works exactly the same as another game with a posted solution. A little investigation can be very helpful.
Music Trigger: This will generally be the most important column once you have decided to work on a particular game. It will generally provide sufficient details to control the music engine. Some work to derive valid id's may be required. There are several types of control mechanisms listed in this column. A single bar separates types in some cases where there is more than one option. Triggers are usually listed alone, while block counters are usually listed along with a footnote on the left side of the bar and hacks on the right. Block counters are usually not ideal in and of themselves, but can help to inform values for the hack, since ids in such cases tend to be rather far apart. If neither a song or song pattern trigger is listed, then a hack is listed. Only one is listed for the sake of space, but with a little knowledge conversion between the different types is usually straightforward.
- Trigger: In its typical usage, it refers to a location in RAM that can be edited to change/stop/start the desired track. You can do this either with an emulator that supports it (MEKA/MESS/Emulicious)or a memory browsing tool, of which there are several available.
- SMPS: The most common type of engine trigger is used in the Pre-SMS/SMPS/SMPS-Like engines. SMPS stands for Sample Music Playback System, which is the main engine used by almost all SEGA games, and companies that typically work closely with SEGA such as Aspect, SIMS, Sanritsu, among others. The majority of games do not use this system strictly but many use something similar.. You can typically recognize a game with this engine via its trigger location, which is often DE03,DD03 or something similar. Normally the flag for FM synthesis in master system games is set at DE00,DD00, or similar. A game with it's trigger at these locations has likely removed the code for FM since most games do not use it anyway. Most leave it in, but the value has no effect. Games with these features likely used the Official developer documentation, and quite possible adopted stock code from SEGA. Other developers are likely to use different strategies.
- Other:The implementation of a trigger is common in other games, but most do not use the SMPS-like system other than organizing music by ID and implementing a trigger. The method may vary generally by developer and game. There is no obvious attribute, and generally there is greater variety in how the sound engine gets mapped even within the same developer. Triggers can be before the sound engine area in ram, or after. Near, or far away. Music can start with $00 or $00 can be silence. Music can start with $01 or $01 can be silence. Music can start with $02, or $03, or $04. Or $10 or $20 or $30 or $40 or $80. The engine may have a trigger for sound effects and another for music, or use the same location for both like the SMPS-like engine does. Sometimes a music id is stored in one location and the trigger in another, so that values in two locations must be changed to trigger a song. It is more common to have the default value of a trigger be $00 or $FF or something with a high bit set i.e $X0 (where X=1 to 8), but this does not have to be the case. The point is, outside of the SMPS engine, there is a wide variety in the implementation, and often triggers are not easily visible or found. Also, although most songs will be accessible via trigger, a minority will require some debugging and/or hacking to obtain all tracks. The vast majority will not.
- Block Counter: Rather than triggering a song, a pattern organized by id is set for playback, usually after some delay.
- Krisalis: This type of engine keeps a value in memory that affects the current song pattern. The trigger of a pattern has a delay until the reinitialization of a timer. Song patterns are often mapped out by the sound engine in combination with a few other values in close proximity (block). The engine, left alone, starts playback, then increments the value based on a timer, and plays the next pattern. It does not increment in single pattern songs and usually decreases to a lesser value when it comes to the end of the song-pattern range, and loops. While Probe isn't the only developer to use this strategy, and not all Probe games have such a counter, it is one of the defining features of its sound engine Although a trigger, the level of control isn't accurate enough for accurate playback. While the presence of such a counter allows easy verification of song patterns and sometimes access to tracks that do not occur in game, it is usually only recommended as a complementary method to confirm valid ids, starting values, and general loop points. The better strategy is to confirm valid song starting values, and use a strategy from the next section.
- Hacks: This may be the more common type of trigger required by games to control music playback. Hacks work by changing a value or instructions in ROM. Changes to the game code are required to affect how it works. In most cases the changes are minor, and do not significantly affect program flow. With the emulators available currently, editing ROM can be done in the emulator, such as in MEKA or Emulicious. MEKA also allows adding code to a patch file to produce the same result. In most cases the best available hack was chosen. There are a variety of different types, named somewhat arbitrarily. One type can be easily changed for another with some knowledge of Z80 assembly. With proper knowledge a music trigger can be built as well, but that would require advanced knowledgewhich this guide will not cover. All hacks can be converted to one another, or new ones derived, though not always easily. Hacks are basically a change (usually minor) in program code. Below are those commonly used in the Music Engine Control tables.
- Pause Hack (PH): This is code that is written at byte location $00066  in ROM. It only works on Master System, Sega Game 1000, and a subset of Game Gear games which run in SMS compatibility mode. It is based on Maxim's tutorial (here). It generally consists of three parts. The value loading code (usually 2 bytes), calling the function (3 bytes) and (sometimes) infinite loop code (3 bytes). It works by mapping the code to the pause button on the Master System. By changing the value in the value loading code to a valid song id, you can "trigger" song playback as desired. This is the hack closest to the typical, RAM based trigger. Unfortunately, even in games where it is supported, it is sometimes problematic, in which case other hacks are preferred. It is generally longer than most of the other hacks, but gives greater control. In some cases, either the value loading code or the infinite loop cause problems. Where the loading code causes issues, either more careful study of the game code will be required, or more ideally, if the infinite loop code alone does not cause issues, it can be combined with one of the other hack types. If the infinite loop code causes issues in music playback, it can be omitted, but some care will need to be taken to find a good location to log. In some cases, the pause hack works only temporarily, and the game will eventually (cause unknown) reset itself. In others it will have no effect, or work for a very short time. Whether and how well it works depends on the program code.
- Title Hack (TH): This hack is so named because it changes which music is played back at the title screen. Usually it is selected because the title screen is the best place to log. Where that is not the case, if no other location is found, because it is closer to the beginning of the game. Sometimes a timer may need to be located and frozen. This hack is typically 1 byte (in rare cases more), making it relatively easy to work with. Unlike triggers or the Pause Hack, you do not control or significantly change program flow. You merely let the program run as usual, and when it reaches the point where it is normally executed, what plays back will be the song that matches the value you changed.
- Options Screen Hack (OH): This hack is the same as the title hack, but changes occur on the options screen (if applicable) rather than the Title Screen. Sometimes the options screen does not time out, and is therefore preferred. Some options hacks are a bit more sophisticated, allowing song playback to be affected by moving the cursor. This usually works by substituting the code that calls a sound effect with code that calls a song. It is not always readily possible to do this, such as when only the song id value is loaded at that location. In some cases the music and sound effect functions vary and you will need to have knowledge of the proper value of the music function as well as a valid music id. A sound effect function sometimes muffles the music and is not ideal to leave as is. Usually however, if it does not have sound effects playing throughout, an options hack can be a more convenient to work with.
- Location Hack (OH): This hack is the least ideal, as it requires some familiarity with the game, but in some cases it is the most ideal location (or only one). This hack is usually preceded by a label describing the location, but typical locations are Pre-title screen, Options sub-screen, Intro, Pre-Stage, Level X. The less generic the title the better. Like the other hacks, the only real difference is where it is used.
- Custom Trigger (CT): Currently, no game has this type of hack. Creating one requires finding free space and redirecting program flow so that a location in RAM can be used as a trigger. Only one game currently has this method as an option(), but it generally requires editing in several locations and so is not listed in any of the tables. This might be more readily implemented via ips patching or adding an entry in MEKA's .pat file. Obviously, more advanced knowledge of Z80 assembly is required to implement this solution.
VGM Pack Status: All games with packs listed prior to the creation of this table have a link directly to the music page corresponding to it. In some cases, it may be out of date. Status will usually be "accepted" or "pending". An accepted pack has passed muster and has been uploaded to the main VGM page. New packs may take a while to be uploaded in general. Updates are not frequent. In that case, Searching the Music Forum or visiting the Game page by clicking on the title will help. In some cases, there may be a corresponding pack for the same game on a different system. Sometimes there will be speed differences, and in rare cases a few different tracks, either in addition or replacing others. A footnote indicating this will usually be in the first column after the title, so it is important to read them. The same information can be found at the bottom of a game page under the heading "Same Game, Different Console" at the bottom. It is usually a good idea to work on both versions side by side, for comparison. The sames sometimes applies for a game released in different regions. A little bit of investigation can save you from redoing work that has already been done. Using the different resources on this site is a good idea.
Resources: This tab is meant to hold links of additional interest and relevance to the game. This may include posts from the forums, the development section, or anything that would help inform someone on features of the game. It need not necessarily be music related, but rather information that is relevant to how the game works. Reviews and other information covered by other sections of the site would probably not be appropriate here. This section is meant to hold multiple links, and as such, text anchors describing the destination should be avoided. This column is generally a dumping ground for relevant and edifying tidbits of information.